我想獲得一個正在本地運行的網站,目前運行在運行PHP 5.3.10的開發服務器上。它連接到版本爲5.5的MySQL服務器,但old_passwords
設置爲ON
。Mysqlnd無法連接到MySQL 5.5服務器
該網站在開發服務器上工作。
在我的地方,我運行PHP 5.3.26和嘗試連接時,我得到:
Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: 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
我明白,這是與OLD_PASSWORD變量的問題,但它是開發服務器上運行與PHP 5.3。
編輯: 下面是從phpinfo()
我的本地MySQL部分:
開發服務器的MySQL的部分:
如何設置我的地方,以匹配開發服務器?
沒有。據我瞭解,mysqlnd嚴格使用新的身份驗證模式 – JimiDini
有什麼想法應該在dev服務器上查看我的本地和dev服務器之間的差異? – tubaguy50035