我有問題從PHP 5.3.5(WAMP安裝)連接到MySQL 5.5.8。我收到以下錯誤:mysqlnd無法連接到MySQL 4.1+使用舊的不安全身份驗證
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
我已經試過每一個建議,我可以在網上找到,包括堆棧溢出幾個和這一個:http://engin.bzzzt.biz/2010/11/12/php-mysql-insecure-authentication/
我檢查了我的設置與舊密碼標誌已關閉。我已將密碼更新爲新密碼哈希,並驗證了用戶表中的哈希值爲41個字符,並且刷新了特權。出於某種原因,我仍然收到錯誤。有人有主意嗎?
更新:我正在使用ZenCart。這是我的連接被製成,其中被拋出該錯誤的行:
$this->link = @mysql_connect($zf_host, $zf_user, $zf_password, true) or die (mysql_error());
顯示您的連接代碼。請記住隱藏用戶名/密碼/主機名。 –
@Marc B - 不幸的是我不認爲代碼會有很大的幫助。我在一個繼承的項目的特定實例中使用ZenCart。我已經更新了我正在建立連接的那一行的帖子。 – Luke
也許這個:http://engin.bzzzt.biz/2010/11/12/php-mysql-insecure-authentication/ –