首先说明一下,下面描述仅限于Win系统 其它系统我没试过,MySQL 自从4.1.1以后修改了用户密码的格式, 从16位增加到了41位, 采用了一种新的验证方法,但4.1以前的客户端协议不支持这种方法,所以造成了不能登临的后果.即使密码正确了不能正常登录,提示如下: #1250 - Client does not support authentication PRotocol requested by server; consider upgrading MySQL client
在窗口中执行: C:/mysql/bin>mysql -uroot Welcome to the MySQL monitor. Commands end with ; or /g. Your MySQL connection id is 1 to server version: 5.0.0-alpha-nt
Type 'help;' or '/h' for help. Type '/c' to clear the buffer.
mysql> select passWord('aa'); +-------------------------------------------+ password('aa') +-------------------------------------------+ *DEE59C300700AF9B586F9F2A702231C0AC373A13 +-------------------------------------------+ 1 row in set (0.00 sec)
在另一窗口中 运行 C:/mysql/bin>mysql -uroot Welcome to the MySQL monitor. Commands end with ; or /g. Your MySQL connection id is 540 to server version: 5.0.0-alpha-nt
Type 'help;' or '/h' for help. Type '/c' to clear the buffer.
mysql> select password('mypassword'); +------------------------+ password('mypassword') +------------------------+ 162eebfb6477e5d3 +------------------------+ 1 row in set (0.55 sec)