[ic] Setting up SQL

Brian Kosick interchange-users@icdevgroup.org
Fri Nov 15 16:08:03 2002


Webmaster wrote:

>Thanks!  Another question.  There are many tables in ic, do I only create a
>single "database", like I'm attempting, and then all these tables work from
>that database.  Or do I have to create multiple databases?
>
>----- Original Message -----
>From: "Brian Kosick" <briank@nacs.net>
>To: <interchange-users@icdevgroup.org>
>Sent: Friday, November 15, 2002 3:21 PM
>Subject: Re: [ic] Setting up SQL
>
>
>  
>
>>Webmaster wrote:
>>
>>    
>>
>>>What's the quick & dirty configuration settings on running ic with mysql
>>>      
>>>
>as
>  
>
>>>opposed to the default text database?  I had my sys admin create a
>>>      
>>>
>database
>  
>
>>>named "store" and now I'm trying to get sql configured.  I have the
>>>      
>>>
>server,
>  
>
>>>user & password variables and I have the path command
>>>      
>>>
>(/opt/mysql/bin/mysql
>  
>
>>>store)  supposedly to access my database but can't make it work.
>>>      
>>>
>Something
>  
>
>>>is not clicking here.  Any asssistance would be great!
>>>
>>>
>>>
>>>_______________________________________________
>>>interchange-users mailing list
>>>interchange-users@icdevgroup.org
>>>http://www.icdevgroup.org/mailman/listinfo/interchange-users
>>>
>>>
>>>      
>>>
>>In catalog.cfg
>>edit the SQLDSN
>>
>>ifndef SQLDSN
>>Variable  SQLDSN dbi:Pg:dbname=databasename@www.databaseserver.com
>>endif
>>
>>in variable.txt
>>add/edit
>>MYSQL    1    Database
>>SQLPASS XxXxXx  Database
>>SQLUSER Username  Database
>>
>>in CATROOT/dbconf/mysql
>>make sure that the .mysql columns match up with the product.txt column
>>    
>>
>names
>  
>
>>example: products.mysql
>>
>>Database  products  products.txt __SQLDSN__
>>ifdef SQLUSER
>>Database  products  USER         __SQLUSER__
>>endif
>>ifdef SQLPASS
>>Database  products  PASS         __SQLPASS__
>>endif
>>Database  products  KEY          sku
>>Database  products  COLUMN_DEF   "sku=char(64) NOT NULL PRIMARY KEY"
>>Database  products  COLUMN_DEF   "description=VARCHAR(128) NOT NULL"
>>Database  products  COLUMN_DEF   "title=VARCHAR(128) DEFAULT '' NOT
>>NULL, index(title)"
>>Database  products  COLUMN_DEF   "template_page=VARCHAR(64)"
>>Database  products  COLUMN_DEF   "comment=TEXT"
>>Database  products  COLUMN_DEF   "thumb=VARCHAR(128)"
>>Database  products  COLUMN_DEF   "image=VARCHAR(64)"
>>Database  products  COLUMN_DEF   "price=DECIMAL(12,2) NOT NULL,
>>index(price)"
>>Database  products  COLUMN_DEF   "category=VARCHAR(64) NOT NULL DEFAULT
>>'', index(category)"
>>Database  products  COLUMN_DEF   "prod_group=VARCHAR(64) NOT NULL
>>DEFAULT '', index(prod_group)"
>>Database  products  COLUMN_DEF   "nontaxable=CHAR(3)"
>>Database  products  COLUMN_DEF   "weight=VARCHAR(12) DEFAULT '0' NOT NULL"
>>Database  products  COLUMN_DEF   "size=VARCHAR(96)"
>>Database  products  COLUMN_DEF   "color=VARCHAR(96)"
>>Database  products  COLUMN_DEF   "gift_cert=VARCHAR(3)"
>>Database  products  COLUMN_DEF   "related=text"
>>Database  products  COLUMN_DEF   "featured=VARCHAR(32)"
>>Database  products  NUMERIC      price
>>
>>Check the products directory for tablename.sql or tablename.autonumber
>>if they are there delete or move them.  Make sure that the database is
>>created in mysql but not the tables, and restart interchange.  It will
>>automagically create the tables, and populate them with the values from
>>the products.txt file.  And interchange will recreate the .sql and
>>.autonumber files for you.  Bingo you have IC running on MySQL!
>>
>>
>>_______________________________________________
>>interchange-users mailing list
>>interchange-users@icdevgroup.org
>>http://www.icdevgroup.org/mailman/listinfo/interchange-users
>>
>>    
>>
>
>_______________________________________________
>interchange-users mailing list
>interchange-users@icdevgroup.org
>http://www.icdevgroup.org/mailman/listinfo/interchange-users
>  
>
One database with multiple tables.  ;-)