手机看片精品高清国产日韩,色先锋资源综合网,国产哺乳奶水91在线播放,乱伦小说亚洲色图欧洲电影

幫助中心 >  技術知識庫 >  網站相關 >  程序開發 >  遇到“mysqlnd cannot connect to MySQL 4.1+ using old insecure authentication....”的解決辦法

遇到“mysqlnd cannot connect to MySQL 4.1+ using old insecure authentication....”的解決辦法

2017-01-15 02:16:26 5842

在安裝phpthink時報錯

SQLSTATE[HY000] [2000] mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWord('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file

原因:使用高版本mysql數據庫導入了低版本數據引起的,其中高版本數據庫的password hashes 是41位的hashes,而低版本數據庫的數據存儲的root 的password是16位的hashes,需要修改user表的password字段數據為41為的hashes。

解決辦法:

use mysql;    // 進入存儲user表的數據庫

set session old_passwords=0;   //修改session使用41位hashes(16為1,41的為0)

select password('root');   //查看你的password函數是否可以生成41位的hashes

set password for 'root' @'localhost' = password('root');   //使用password函數修改你的root密碼為41的hashes


提交成功!非常感謝您的反饋,我們會繼續努力做到更好!

這條文檔是否有幫助解決問題?

非常抱歉未能幫助到您。為了給您提供更好的服務,我們很需要您進一步的反饋信息:

在文檔使用中是否遇到以下問題: