我正在將我的網站從小型VPS移動到大型專用服務器。但這是一個奇怪的問題。CakePHP數據庫:SQLSTATE 28000 - 錯誤1045拒絕訪問用戶'kcal'@'localhost'
我不斷收到此錯誤:
Missing Database Connection Error: SQLSTATE[28000] [1045] Access denied for user 'kcal'@'localhost' (using password: YES) requires a database connection Error: Confirm you have created the file : app/Config/database.php. Notice: If you want to customize this error message, create app/View/Errors/missing_connection.ctp.
是:文件被創建,用戶已經做出,密碼是正確的。 (我甚至改變了它簡單的兩次)
但我仍然得到這個錯誤。
我讀過我需要pdo_mysql擴展名,但是這是默認安裝的。我有它,它已安裝並啓用!
我所有的其他應用程序工作正常。不過,這是唯一的CakePHP。
查看'show grants for kcal @ localhost' - 並記住mysql認爲來自tcp連接的登錄名是與通過本地unix域套接字進入的帳戶不同的帳戶。 – 2012-08-09 17:51:16
您是否試過'127.0.0.1'而不是'localhost'? – jeremyharris 2012-08-09 18:03:04