2014年3月9日 星期日

關於mysqlnd cannot connect to MySQL 4.1+

一直遇到php連不上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換密碼加密的方式,所以只要SET PASSWORD = PASSWORD('your_existing_password')
後來又發現要將SET SESSION old_passwords = 0;才行
詳細內容


PS.連結上推薦的mac工具不能用,我另外找到Liya

沒有留言: