User can't login to MySQL after server transfer

Brian S

Verified User
Joined
Oct 27, 2003
Messages
57
I am transferring servers. Before doing so, I upgraded MySQL from 4.1 to 5.1. It all works fine on the old server; I can login to phpMyAdmin with "clientusername" and his databases are listed.

However, after doing a restore on the new server, which is running exact same version of MySQL, I can't login either via shell or phpMyAdmin. "root" wasn't working either until I updated the password as outlined here. da_user seems to be working fine-- DA has no problems creating new users or updating password of an existing user. But no matter what, I can't login under their username and see their DBs in phpMyAdmin.

I've googled for hours and found nothing. my.cnf is identical on both servers. Any suggestions?

Thanks,

Brian
 
While I'm not a MySQL guru (though I have on on call :)), I seem to remember that a few years there was an issue with default password method being changed on MySQL; I remember we had to reset passwords once (years ago) when we moved to a new server. Maybe your MySQL on your old machine still used old passwords but on the new one it defaulted to the new style of passwords? Just writing off the top of my head.

But what I'd look for would be if there are any differences in the MySQL configuration.

Jeff
 
I read the change was from version 3 to 4 so I did not comment. However it is definitely possible that your 4 was set up to use old passwords as well and maybe the upgrade to 5 automatically set it up to use old passwords as well.

However on your new server you started out with 5 and so it doesn't know about the old passwords.

I am just throwing out something to look at.
 
You can add in /etc/my.cnf under the mysqld section.

old_passwords=1

This will support old password method.
 
Last edited:
I tried the old_passwords flag, and that didn't work. I'm going to see if there's a way to manually update the passwords through a script. Not sure how that'll work since their passwords are not in plain text.

Thanks,

Brian
 
It's likely that on every site using a MySQL database there's a password in plaintext somewhere in a configuration file. Otherwise how would your php know how to make a call to the database?

Jeff
 
This is true. Though, after a full server transfer, it seems that phpMyAdmin login is working. I tried on another domain I own and I was able to get in. Strange, maybe it was a problem with one domain. I asked a client if he was able to login through phpMyAdmin, so we'll see...

Thanks,

Brian
 
Back
Top