我最近在MySQL中將根用戶的密碼重置爲空白值。我在config.inc.php文件證實,是這種情況:MAMP錯誤:檢查MySQL數據庫失敗
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed
// with 'config' auth_type)
不過,我每次重新啓動服務器MAMP時,這個錯誤彈出:
Checking the MySQL databases failed
Error message:
/Applications/MAMP/Library/bin/mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect
不過,我還是可以通過MySQLWorkBench完美地連接到我的MySQL數據庫。只是這個愚蠢的錯誤每次都會彈出,即使我沒有設置密碼。爲什麼這種情況繼續發生?
我試過一切,從重新啓動MAMP到重置我的密碼從命令行(the solution in the MAMP docs),無濟於事。我也嘗試執行以下操作:
$ /Applications/MAMP/Library/bin/mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
...
mysql>
所以我可以通過終端成功連接到MySQL。這是否意味着問題出在我的phpMyAdmin配置中?