[ic] Newbie DB question

Stefan Hornburg Racke interchange-users@interchange.redhat.com
Mon May 20 14:20:01 2002


Ian Eure <ieure@qwest.net> writes:

> Hi. I'm trying to get Interchange integrated with an existing MySQL database. 
> I've got it mostly working, I'm just really confused about these TAB 
> databases. I can't seem to get Interchange working without having a TAB 
> database, and it will only use N SQL records, where N = the number of records 
> in the TAB DB.
> 
> It seems completely silly to use a SQL DB, yet be so dependent on a text 
> database as well. Am I just misunderstanding, or is Interchange really 
> dependent on this TAB DB?

No, you can set the configuration directive "NoImportExternal Yes" and
Interchange uses SQL/LDAP as ultimative reference instead of the TAB
files. No more import at startup anymore. 

> 
> Here's the relevent sections of my catalog.cfg:
> 
> -- snip --
> Database        products        products.txt    SQL
> Database        products        DSN     dbi:mysql:sso
> Database        products        USER devel
> Database        products        PASS testing
> Database        products        COLUMN_DEF "id=int(11) not null default 0"
> Database        products        COLUMN_DEF "description=varchar(255)"
> Database        products        COLUMN_DEF "price=varchar(255)"
> NoImport        products
> DynamicData     products
> ProductFiles    products
> -- snip --
> 
> (I also tried turning on VariableDatabase, it had no effect)
> 
> Also, can someone point me at some documentation about setting up users for 
> the admin interface? I see mention of UserDB in the foundation catalog, but 
> not much mention of it in the documentation.

Usually the "access" table is used for UI users. If you use SQL for this
access table, you can do (MySQL): 

insert into access (username,password,super) values
('ian',encrypt('secret'),1);

Now you have an superuser account for the UI, other users can be created
within the UI itself.

Ciao
        Racke

-- 
Free resources for Interchange programming NOW !!! 
Don't hesitate to contact me if you need my professional help.
Your core developer and consultant for the most sophisticated,
flexible and extensible Open Source eCommerce software.