M
mmccaws2
I'm getting closer but don't know where I going wrong. On HPUX system
and had to manually install DBI and DBD-mysql modules. the error
message says
error message begin
DBD::mysql initialisation failed: Can't locate object method "driver"
via package "DBD::mysql" at /opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-
thread-multi/DBI.pm line 782.
Perhaps the capitalisation of DBD 'mysql' isn't right. at ./conntst.pl
line 6
error message end
now the install seems to have installed it in my .cpan directory
/home/mmcca/.cpan/Bundle/DBD/mysql.pm
so in the test script I put a lib statement. Am I using lib correctly
or do I need a different method to have mysql.pm visible to the DBI
module? Below the code is the original error message.
#!/usr/bin/perl
use strict;
use lib '/home/mmcca/.cpan/Bundle';
use DBI;
my $dbh = DBI->connect('DBI:mysql:smartcard:localhost', 'root',
'Welcome1',
{RaiseError => 1});
if ($dbh) {
print "Successfully connected to the database\n";
}
$dbh->disconnect;
orignal error message
$ ./conntst.pl
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC
contains: /home/mccannm/.cpan/Bundle/DBD /opt/perl_32/lib/5.8.8/
IA64.ARCHREV_0-thread-multi /opt/perl_32/lib/5.8.8 /opt/perl_32/lib/
site_perl/5.8.8/IA64.ARCHREV_0-thread-multi /opt/perl_32/lib/site_perl/
5.8.8 /opt/perl_32/lib/site_perl /opt/perl_32/lib/vendor_perl/5.8.8/
IA64.ARCHREV_0-thread-multi /opt/perl_32/lib/vendor_perl/5.8.8 /opt/
perl_32/lib/vendor_perl .) at (eval 4) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Proxy, SQLite, Sponge,
mysqlPP.
at ./conntst.pl line 6
and had to manually install DBI and DBD-mysql modules. the error
message says
error message begin
DBD::mysql initialisation failed: Can't locate object method "driver"
via package "DBD::mysql" at /opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-
thread-multi/DBI.pm line 782.
Perhaps the capitalisation of DBD 'mysql' isn't right. at ./conntst.pl
line 6
error message end
now the install seems to have installed it in my .cpan directory
/home/mmcca/.cpan/Bundle/DBD/mysql.pm
so in the test script I put a lib statement. Am I using lib correctly
or do I need a different method to have mysql.pm visible to the DBI
module? Below the code is the original error message.
#!/usr/bin/perl
use strict;
use lib '/home/mmcca/.cpan/Bundle';
use DBI;
my $dbh = DBI->connect('DBI:mysql:smartcard:localhost', 'root',
'Welcome1',
{RaiseError => 1});
if ($dbh) {
print "Successfully connected to the database\n";
}
$dbh->disconnect;
orignal error message
$ ./conntst.pl
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC
contains: /home/mccannm/.cpan/Bundle/DBD /opt/perl_32/lib/5.8.8/
IA64.ARCHREV_0-thread-multi /opt/perl_32/lib/5.8.8 /opt/perl_32/lib/
site_perl/5.8.8/IA64.ARCHREV_0-thread-multi /opt/perl_32/lib/site_perl/
5.8.8 /opt/perl_32/lib/site_perl /opt/perl_32/lib/vendor_perl/5.8.8/
IA64.ARCHREV_0-thread-multi /opt/perl_32/lib/vendor_perl/5.8.8 /opt/
perl_32/lib/vendor_perl .) at (eval 4) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Proxy, SQLite, Sponge,
mysqlPP.
at ./conntst.pl line 6