Hello!
I'm hoping you can help me. I am getting the error,
"Access denied for user ... (Using password: NO)"
from a call to DBI->connect, despite the fact that a password is,
in fact, being passed as its third parameter.
My concern is not a matter of the *wrong* password being sent; it's
that MySQL is reporting that *no* password is being sent as all.
I have had to mask the following values for security's sake:
The correct database name is represented by DDDDDD
The correct database server hostname is represented by SSSSSS
The correct database client hostname is represented by CCCCCC
The correct database username is represented by UUUUUU
The correct database password is represented by PPPPPP
Here is a simple program which demonstrates the problem:
% more simple.pl
#!/usr/bin/perl
use DBI;
$dbh = DBI->connect( "dbi:mysql:database=DDDDDD;host=SSSSSS",
"UUUUUU", "PPPPPP") || die $DBI::errstr;
$rc = $dbh->disconnect;
You will note that when it is run, the remote server does recognize
that it is user UUUUUUU and database client machine CCCCCC. It claims
that the password isn't even being sent:
% simple.pl
DBI->connect(database=DDDDDD;host=SSSSSS) failed: Access denied for
user: 'UUUUUU@CCCCCC' (Using password: NO) at simple.pl line 5
Access denied for user: 'UUUUUU@CCCCCC' (Using password: NO) at simple.pl
line 5.
Note that this is the identical error shown when the standard mysql client
is not supplied with a password:
% /usr/local/mysql/bin/mysql --host=SSSSSS --user=UUUUUU
ERROR 1045: Access denied for user: 'UUUUUU@CCCCCC' (Using password: NO)
Lest anyone say that I mistyped the password, etc., here's the error
when I intentionally pass a password, but an incorrect one:
% /usr/local/mysql/bin/mysql --host=SSSSSS --user=UUUUUU --password=foo
ERROR 1045: Access denied for user: 'UUUUUU@CCCCCC' (Using password: YES)
Finally, here is an accepted connection when the correct password is used:
% /usr/local/mysql/bin/mysql --host=SSSSSS --user=UUUUUU --password=PPPPPP
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 941988 to server version: 3.22.22
Type 'help' for help.
mysql> Bye
Software versions:
On database client machine:
DBI 1.15
Data::ShowTable 3.3
DBD::mysql (Msql-Mysql-modules) 1.2216
On database server machine:
MySQL 3.22.22 (Yes, I know this is ancient) on database server machine
Corresponding headers, etc., for this install are on database client machine,
and were properly referenced when the above packages were built.
Thank you in advance for any insight that you can lend to this matter!
-- David Beroff <[EMAIL PROTECTED]> Founder/CEO, note.com LLC
P.O. Box 234, Jenkintown, PA 19046-0234 (USA) http://note.com
Voice: +1 (215) 576-6800 Fax: +1 (215) 576-6853 ICQ: 3652887
Toll-free: 1.800.note.163 Home page: http://David.Beroff.com