I have a lot of users (privilages) in mysql server 5.0 .
I want to transfer all of them into new MySQL server 5.5 . But the passwords are in old format (in `mysql`.`user` table). So I want to convert all old passwords to new format.
Is there any way to transfer and upgrading the MySQL passwords without changing them?
Assuming you know the password you can
set password = password('samepasswordasbefore');
after old_passwords has been set to off for the server or the session.
set old_passwords = 'OFF';
or
set [session] old_passwords = 'OFF';
The server does not care/know that it is the same password as before.
As a result there is no risk to running software though from a security perspective you should change the passwords as the old one may have been compromised. Of course it would be even better to be forcing them to change periodically in which case you could just set old_passwords OFF and wait.
Doing the set password in bulk isn't going to be so easy but if old_passwords has been OFF for some time there should only be a few accounts with old short hashes in user. You can at least identify those that have not been updated as those with a shorter hash in the user table.