I'm having a similar problem as Stefan.  Here is the error message:

Software error:
install_driver(mysql) failed: [Thu Jun 28 22:42:15 2001] c4.cgi: Can't
locate DBD/mysql.pm in @INC (@INC contains:
/usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503
/usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 .)
at (eval 10) line 3. Perhaps the DBD::mysql perl module hasn't been fully
installed, or perhaps the capitalisation of 'mysql' isn't right. Available
drivers: ADO, ExampleP, Multiplex, Proxy. at c4.cgi line 21

Here is my version:

    #open connection to Access database
    $dbName = '********';
    $dbhost = 'localhost';
    $dbUserName = '*********';
    $dbPassword = '*******';

    $data_source = 'DBI:mysql:$dbName:$dbhost';

    $dbh = DBI->connect($data_source , $dbUserName, $dbPassword);

I also tried Hardy's version:

    $dsn = "DBI:mysql:database=$database;host=$hostname;

    $dbh = DBI->connect($dsn, $user, $password);

I also tried this which I got from somewhere:

    $drh = DBI->install_driver( 'mysql' );

    $dbh = $drh->connect($dbUserName, $dbPassword);

I ran the command from Stefan's message:

    perl -MDBI -e 'print join("\n",DBI->available_drivers) . "\n";'

at the telnet command line and got the same list of drivers as listed in the
error mssge above.  I've asked the sysadmin to check the installation of the
DBI modules and he says he reinstalled them.  Can I be reasonably sure
however that the driver isn't installed correctly from what I know?

Thank You
Brent




Reply via email to