首先說明一下,下面描述僅限于Win系統(tǒng) 其它系統(tǒng)我沒試過,MySQL 自從4.1.1以后修改了用戶密碼的格式, 從16位增加到了41位, 采用了一種新的驗(yàn)證方法,但4.1以前的客戶端協(xié)議不支持這種方法,所以造成了不能登臨的后果.即使密碼正確了不能正常登錄,提示如下: #1250 - Client does not support authentication PRotocol requested by server; consider upgrading MySQL client
在窗口中執(zhí)行: 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)
在另一窗口中 運(yùn)行 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)