The code I'm using is:
use DBI();
my $dbh = DBI->connect('DBI:mysql:database', 'username', 'password');
where database is the database name, etc. This generates the error:
DBI connect('database','username',...) failed: Access denied for user: 'username@localhost' (Using password: YES)
I can connect to the database successfully using the same credentials from PHP, from the command line, and from Perl via a pipe. System details are as follows:
Linux 2.4.31-ow1
MySQL server 4.0.25
PERL 5.8.0
DBI 1.48
DBD::mysql 2.9008
FYI the script is not a CGI, but one I would like to run from the command line to automate some database maintenance tasks.
Many thanks in advance for any help.
slaydude