I set up the x509 certificates as stated in the MySQL documentation.
I have the user certificates listed in the .my.cnf file and can connect fine whether I define table to use passwords or not.
I wrote the following short Perl program to try to do the same thing programmatically...
#!/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/rac/.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;
No matter how I configure MySQL 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$
Has anybody been able to get this type of configuration to work, and if so, can you give me any insight into what I am doing wrong?
-- 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://pubweb.bnl.gov/~rac - James Joyce | mailto:[EMAIL PROTECTED] (631) 344-7975
