[ic] mysql connection

Actormailings.com info interchange-users@icdevgroup.org
Mon Oct 7 15:23:01 2002


Schuyler Langdon writes:
I'm getting an unusual problem with mysql. When I start ic (4.8.6) with a
catalog configured for mysql it gives the error: "no database driver
specified and DBI_DSN env var not set". It does this when trying to create a
table it thinks doesn't exist. However, it does read the first table,
"options", then fails on all the others. I also tried setting up a catalog
with makecat and the same thing -- it created the table "options", then
failed on the rest.

When the database connection fails, it looks like only the user name and
password -- and not the DSN are being passed to DBI::connect. This is the
array that is returned from find_dsn in DBI.pm:
find_dsn dump= [
  undef,
  'user',
  'pass',
  undef,
  undef
]
Shouldn't the first element be the actual DSN string? This is the DSN from
the catalog.cfg:
DSN=DBI:mysql:test_db;mysql_socket=/usr/mysql/temp/mysql.sock, which is a
valid DSN and does provide a connection for the first table read as follows:

    <- prepare('select * from options limit 1' CODE)=
DBI::st=HASH(0x9347078) at DBI.pm line 1362.
    <- execute(CODE)= 1 at DBI.pm line 1366.
    <- FETCH= [ 'code' 'o_master' 'sku' 'o_group' 'o_sort' 'phantom'
'o_enable' 'o_matrix' 'o_modular' 'o_default' 'o_label' 'o_value' 'o_widget'
'o_footer' 'o_header' 'o_height' 'o_width' 'description' 'price' 'wholesale'
'differential' 'weight' 'volume' 'mv_shipmode' 'o_exclude' 'o_include' ] at
DBI.pm line 1371.
________________

I know it seems like this shouldn't be it, because the options table is
created, but I went through the exact same thing.  Kevin helped me and it
worked like a charm.

It looks as though your SQL_DSN directive is DBI:mysql:test_db  when it
should be dbi:mysql:test_db (no caps).  Try it and see.  I hope it helps.
Jordan

Fire your LOCAL phone company and get FREE long distance from your home
phone.
http://phonefreeusa.com