Hello again Anonymous Monk,
What fellow Monk Corion is raising is a very valid point. Have you checked if manually you can connect to the DB with the same credentials that you are using on your script? Sample from the official documentation (4.2.2 Connecting to the MySQL Server) see below:
mysql -h localhost -u myname -ppassword mydb
Can you check manually and let us know if the problem still exists with your username and password? Another possibility is that you are trying to pass special characters into your username / password and they are not processed correctly. For example characters as: @ or | and many others. If this is the case you can use the module quotemeta which will do the work for you.
For example:
#!/usr/bin/perl
use strict;
use warnings;
use feature 'say';
my $mySpecialChar = q(@|);
say $mySpecialChar;
my $quotedSpecialChar = quotemeta $mySpecialChar;
say $quotedSpecialChar;
__END__
perl test.pl
@|
\@\|
Hope this helps, BR.
Seeking for Perl wisdom...on the process of learning...not there...yet!
|