mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication.


在阿里雲ecs雲服務器調用雲主機的數據庫時mysql報錯如下:

連接失敗: 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加密模式是16位的hash,改為41位的就可以了

PHP5.3、5.4、5.5版本,加密模式設置為41位

 


注意!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系我们删除。



 
粤ICP备14056181号  © 2014-2020 ITdaan.com