且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

✘CakePHP无法连接到数据库。无法建立与数据库的连接:SQLSTATE [HY000] [1045]用户'my_app'@'localhost'拒绝访问(使用密码:YES)

更新时间:2023-08-24 12:07:37

错误消息非常简单:用户my_app没有正确的凭据登录数据库。



用户名错误,密码错误或两者兼有 - 或者用户没有您尝试连接的特定数据库的访问权限。

检查作为连接字符串一部分发送的用户名和密码,并使用以进行验证SQL Server通过SSMS。
The error message is pretty self explanatory: the user "my_app" does not have teh right credentials to log into the database.

Either the user name is wrong, the password is wrong, or both - or the user does not have access rights for the specific database you are trying to connect to.
Check the username and password you are sending as part of your connections string, and verify them with SQL Server via SSMS.