It should tell you something that ALL tests failed, first off.  It sounds
like your problem is that your MySQL libraries aren't in your ld searchpath.
Try one of the following, see if it helps.

1) set in your shell LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mysql/lib
2) add /mysql/lib to /etc/ld.so.conf, run ldconfig

The relocation error is Perl telling you that it can't locate the symbol
'mysql_init', meaning that it can't locate the library that exports that
function.

Christopher S. Cosby
SciCare Software Services
770.236.1128 

> -----Original Message-----
> From: Umesh [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, February 27, 2003 9:49 AM
> To: [EMAIL PROTECTED]
> Subject: Problem accessing mysql database using perl script
> 
> 
> Hi All,
> 
> I have installed MySql database on a RedHat 8.0 Database, I 
> am trying to access the records in a table using the perl 
> script, which is as below:
> 
> #! /usr/bin/perl
> 
> use DBI;
> 
> my $dsn = 'DBI:mysql:engineer:localhost';
> my $db_user_name = 'engineer';
> my $db_password = 'xport';
> my $dbh = DBI->connect($dsn, $db_user_name, $db_password);
> 
> my $sth = $dbh->prepare(qq{ select empid, empname from employee });
> $sth->execute();
> while (my ($id, $name) =
>     $sth->fetchrow_array())  # keep fetching until
>                              # there's nothing left
> {
>      print "$id, $name\n";
> }
> $sth->finish();
> 
> 
> It fails saying:
> 
> perl: relocation error: 
> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/DB
> D/mysql/mysql.so: undefined symbol: mysql_init
> 
> I have installed DBD-mysql-2.1025 rpm on the machine and I 
> executed these commands
> 
> perl Makefile.PL --cflags=-I'/mysql/include' 
> --libs=-L'/mysql/lib' --testdb=mydb --testuser=myuser 
> --testpassword=mypwd --testhost=localhost --testport=3306
> 
> make
> 
> make test  (all the tests failed)
> 
> make install
> 
> Please tell me whether there's any problem with DBD driver 
> installation, if so tell me how to install it properly. And 
> also tell me, if any additional drivers are required and from 
> where I can get those drivers.
> 
> Thanks and regards,
> Umesh
> 


     - - - - - - -  Appended by Scientific-Atlanta, Inc.  - - - - - - -  
This e-mail and any attachments may contain information which is confidential, 
proprietary, privileged or otherwise protected by law. The information is solely 
intended for the named addressee (or a person responsible for delivering it to the 
addressee). If you are not the intended recipient of this message, you are not 
authorized to read, print, retain, copy or disseminate this message or any part of it. 
If you have received this e-mail in error, please notify the sender immediately by 
return e-mail and delete it from your computer. 

Reply via email to