官方的解释:
mysql 4.1 and up uses an authentication protocol based on a password hashing algorithm that is incompatible with that used by older clients. if you upgrade the server to 4.1, attempts to connect to it with an older client may fail with the following message:
shell>; mysql
client does not support authentication protocol requested
by server; consider upgrading mysql client
to solve this problem, you should use one of the following approaches:
upgrade all client programs to use a 4.1.1 or newer client library.
when connecting to the server with a pre-4.1 client program, use an account that still has a pre-4.1-style password.
reset the password to pre-4.1 style for each user that needs to use a pre-4.1 client program. this can be done using the set password statement and the old_password() function:
mysql>; set password for
->; 'some_user'@'some_host' = old_password('newpwd');
alternatively, use update and flush privileges:
mysql>; update mysql.user set password = old_password('newpwd')
->; where host = 'some_host' and user = 'some_user';
mysql>; flush privileges;
substitute the password you want to use for ``newpwd'' in the preceding examples. mysql cannot tell you what the original password was, so you'll need to pick a new one.
tell the server to use the older password hashing algorithm:
start mysqld with the --old-passwords option.
assign an old-format password to each account that has had its password updated to the longer 4.1 format. you can identify these accounts with the following query:
mysql>; select host, user, password from mysql.user
->; where length(password) >; 16;
for each account record displayed by the query, use the host and user values and assign a password using the old_password() function and either set password or update, as described earlier.
for additional background on password hashing and authentication, see section 5.5.9, "password hashing in mysql 4.1".
previous / next / up / table of contents
阅读(13973) | 评论(0) | 转发(4) |