I am having a problem getting this to work and the documentation
I have found doesn't seem to be helping, hopefully someone out there
can help me.
I am using MySQL 4.01-Gamma on a Debian Linux box. I have configured
MySQL exactly as the manual shows in Section 4.3.9 - Using Secure
Connections, including 4.3.9.3 - Setting up SSL Certificates. This
all works as advertised if I access mysql from the command line.
I have a short Perl program which I have included which uses DBI 1.32.
I can not get the authentication to work whether I include "$password"
or not. I get the following error...
[EMAIL PROTECTED]:rac$ dbtest.pl
DBI
connect('menagerie:localhost;mysql_read_default_file=/home/rac/.my.cnf','rac
',...)
failed: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) at
/home/rac/perl/src/dbtest.pl line 7
Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) at
/home/rac/perl/src/dbtest.pl line 7.
[EMAIL PROTECTED]:rac$
Here's the code...
#!/usr/bin/perl -w
#
use DBI;
my $query;
my $user = "rac";
my $password = "testpass";
my $dbh =
DBI->connect("DBI:mysql:menagerie:localhost;mysql_read_default_file=/home/ra
c/.my.cnf", $user, $password)
|| die "$DBI::errstr";
$query=$dbh->prepare("select * from pet") || die "prepare-> $DBI::errstr";
$query->execute;
while ((@userinfo)=$query->fetchrow) {
print "$userinfo[0]\n";
}
$query->finish;
$dbh->disconnect;
exit 1;
Any help will be greatly appreciated,
Rich
Emerging Software Technology
A man of genius makes no mistakes.| Brookhaven National Laboratory
His errors are volitional and are | ITD Bldg 515, Upton, NY 11973 USA
the portals of discovery | http://www.buoy.com/~rac
- James Joyce | mailto:[EMAIL PROTECTED] (631) 344-7975