hi Alexander..

thanks for you mail..

here is the code i compiled this code in solaris machine. but i got an
error. it feel its some additional packages. could you please help me on
this..

#!/usr/bin/perl -w
use DBI;
$dbh = DBI->connect('dbi:mysql:perltest','root','password')
or die "Connection Error: $DBI::errstr\n";
$sql = "select * from samples";
$sth = $dbh->prepare($sql);
$sth->execute
or die "SQL Error: $DBI::errstr\n";
while (@row = $sth->fetchrow_array) {
print "@row\n";
}

*error *

install_driver(mysql) failed: Can't load
'/usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris/auto/DBD/mysql/mysql.so'
for module DBD::mysql: ld.so.1: /usr/bin/perl: fatal: libmysqlclient.so.15:
open failed: No such file or directory at
/usr/local/lib/perl5/5.8.8/sun4-solaris/DynaLoader.pm line 230.
 at (eval 3) line 3
Compilation failed in require at (eval 3) line 3.
Perhaps a required shared library or dll isn't installed where expected
 at ./test2.pl line 3

i checked the flags.

*andd141# mysql_config --libs*
-L/usr/local/lib -R/usr/local/lib -R/usr/lib -L/usr/lib -R/usr/openwin/lib
-L/usr/openwin/lib -L/usr/local/ssl/lib -R/usr/local/ssl/lib
-L/usr/local/BerkeleyDB.4.2/lib -R/usr/local/BerkeleyDB.4.2/lib
-L/usr/openwin/lib -R/usr/openwin/lib *-L/usr/local/mysql/lib/mysql
-lmysqlclient -lz* -lposix4 -lresolv -lgen -lsocket -lnsl -lm
-L/usr/local/ssl/lib -lssl -lcrypto

*andd141# mysql_config --cflag*
*-I/usr/local/mysql/include/mysql* -L/usr/local/lib -R/usr/local/lib
-L/usr/local/ssl/lib -R/usr/local/ssl/lib -L/usr/openwin/lib
-R/usr/openwin/lib -I/usr/local/rrdtool-1.2.19/include

both flags are there..

is there any additional packages i have to install. please assist me..

thanks in advance..

Best Regards
Faizal S
GSM : 9840118673
Blog: http://oradbapro.blogspot.com


On Tue, Oct 13, 2009 at 11:23 PM, Alexander Foken <[email protected]>wrote:

> Read the error message. It explains you very detailed that your connect
> string has the wrong format, and it tells you what format it expects. Read
> the DBD::mysql documentation for the required format, read the DBI
> documentation for the correct format.
>
> Alexander
>
> On 13.10.2009 10:56, F.A.I.Z.A.L wrote:
>
>> hi expert
>>
>> please help me. iam not able to connect mysql db.
>>
>> Can't connect to data source 'DBI:mysql database=LTSdb;host=localhost'
>> because I can't work out what driver to use (it doesn't seem to contain a
>> 'dbi:driver:' prefix and the DBI_DRIVER env var is not set) at
>> ./test.plline 7
>>
>> anyone please help. its urgent..
>>
>> Best Regards
>> Faizal S
>> GSM : 9840118673
>> Blog: http://oradbapro.blogspot.com
>>
>>
>>
>
>
> --
> Alexander Foken
> mailto:[email protected]  http://www.foken.de/alexander/
>
>

Reply via email to