We have a number of Perl scripts which connect to a MySQL server from a Solaris 5.9 box
We are now upgrading to a new SunOS 5.10 server, but attempting the run the same scripts to connect to the same MySQL server no longer works.
After a little surfing I found that the problem was that MySQL assigns permissions based on the host you connect from, so I needed to add the user with the new host. I did this using:
GRANT ALL PRIVILEGES ON DATABASE.* TO
USER@SERVER.DOMAIN.com IDENTIFIED BY 'USER' WITH GRANT OPTION;
The user I'm using to connect to the database does not have a password. However, when I try to connect using this user from the new Solaris box with the same scripts, I get the following error:
DBI connect('database=production;host=SERVER;port=PORT','USER',...) failed: #28000Access denied for user 'USER'@'SERVERNAME.DOMAIN.com' (using password: YES) at /usr/local/lib/perl5/site_perl/5.8.7/DBD/mysqlPP.pm line 109
I find the '(using password: YES)' message somewhat troubling as I'm passing a blank password. Strangely, if I assign a password to this user, I can connect to it without error (assuming I update the script to connect using the new password, of course.)
I'm using Perl v5.8.7 built for sun4-solaris and DBI 1.54, which are both slighter newer than what is on the older box. In the hopes that this was a flaw in the newer DBI, I downgraded the module to the version we were using, but this gives the same results.
Any help would be most... helpful.