In general, upgrading to 4.1 from an earlier MySQL version involves the following steps:
mysql_fix_privilege_tables
to generate the new
longer Password
column that is needed for secure handling of
passwords.
The password hashing mechanism has changed in 4.1 to provide better security, but this may cause compatibility problems if you still have clients that use the client library from 4.0 or earlier. (It is very likely that you will have 4.0 clients in situations where clients connect from remote hosts that have not yet upgraded to 4.1). The following list indicates some possible upgrade strategies. They represent various tradeoffs between the goal of compatibility with old clients and the goal of security.
mysql_fix_privilege_tables
script
to widen the Password
column in the user
table so
that it can hold long password hashes. But run the server with the
--old-passwords
option to provide backward compatibility that
allows pre-4.1 clients to continue to connect to their short-hash
accounts.
Eventually, when all your clients are upgraded to 4.1, you can stop using the
--old-passwords
server option. You can also change the passwords for
your MySQL accounts to use the new more secure format.
mysql_fix_privilege_tables
script to widen the
Password
column in the user
table. If you know that all clients
also have been upgraded to 4.1, don't run the server with the
--old-passwords
option. Instead, change the passwords on all existing
accounts so that they have the new format. A pure-4.1 installation
is the most secure.
Further background on password hashing with respect to client authentication and password-changing operations may be found in section 4.2.11 Password Hashing in MySQL 4.1.