[ic] mysql connection

Schuyler W Langdon interchange-users@icdevgroup.org
Mon Oct 7 11:02:01 2002


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.

Is there any reason why the DSN wouldn't be passed in subsequent calls?

Thanks,

Schuyler Langdon
GatorDev