我正在将我的网站从小型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