Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mysql Driver issue

Status
Not open for further replies.

thendal

Programmer
Aug 23, 2000
284
Hi all!

I am getting the following error in my error_log when i run the following mysql DB connect script

error_message
------------------------------------------------------
install_driver(mysql) failed: Can't load '/usr/local/lib/perl5/site_perl/5.8.0/i386-freebsd/auto/DBD/mysql/mysql.so' for module DBD::mysql: Shared object "libmysqlclient.so.12" not found at /usr/local/lib/perl5/5.8.0/i386-freebsd/DynaLoader.pm line 229.
at (eval 5) line 3
Compilation failed in require at (eval 5) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /usr/local/apache/cgi-bin/mysql_connect.pl line 6


Mysql Connect Script
-----------------------------------------------------
#!/usr/bin/perl
use DBI;
use CGI;
$op=new CGI;
print $op->header;
$dbh = DBI->connect('DBI:mysql:test', 'username', 'password')
or die "Couldn't connect to database: " . DBI->errstr;


$query=$dbh->prepare(q{select name,location from Test_table})|| die $dbh->errstr;
$query->execute()|| die $dbh->errstr;
$query->bind_columns(undef,\$name,\$location)|| die $dbh->errstr;



while(my @data=$query->fetchrow_array)
{
$name=$data[0];
print "Name : $name \n";
$location=$data[1];
print "Location: $location \n";

}

---------------------------------------

It works fine when i run the above script from command line.

I have installed Msql-Mysql-modules-1.2219 on my server.

Any help would be greatly appreciated.

-Thendal
 
Thanks sleipnir214, Could you explain what is default path probelm means. or if its a permission problem what permission i shoud change....please bear with my limited knowledge in unix ...

Thanks again i appreciate your response.

Regards,
Thendal
 
I don't know ..how to check whether client libraries installed or not? ...

also where i can download this libraries ...:(

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top