0

I have a remote MySQL server. I can log in from the client machine using:

mysql -h 172.16.0.7 -u mysqlUser -p

and it connects fine.

When I use a simple DBH connection in Perl, with same credentials, the MySql server comes back with Access denied for user 'mysqlUser'@'172.16.0.5'.

That IP has been explicitly granted access in the database.

Both servers are running Centos 6.3. Perl is 5.10.1; MySQL is 14.14.

mgorven
  • 31,399

1 Answers1

0

DBH requires that you specify a database name as part of your DSN when connecting, while the CLI client does not; if you attempt to connect to a database on which your user has no permission (or one which does not exist) you'll be rejected with the same 'access denied' message you mention. That's the first thing I'd check.

Jeff Albert
  • 1,977