AVTDF
2022-04-10 09:25
采纳率: 64.7%
浏览 181

请问MySQL数据库拒绝访问是什么情况?

以管理员身份运行的命令提示符界面代码:

(c) Microsoft Corporation。保留所有权利。

C:\Windows\system32>net start mysql57
请求的服务已经启动。

请键入 NET HELPMSG 2182 以获得更多的帮助。

C:\Windows\system32>mysql -h localhost -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

C:\Windows\system32>mysql -h localhost -u root -p

MySQL Workbench错误提示界面:

[Window Title]
MySQL Workbench

[Main Instruction]
Cannot Connect to Database Server

[Content]
Your connection attempt failed for user 'root' to the MySQL server at localhost:3306:
Access denied for user 'root'@'localhost' (using password: YES)

Please:
1 Check that MySQL is running on address localhost
2 Check that MySQL is reachable on port 3306 (note: 3306 is the default, but this can be changed)
3 Check the user root has rights to connect to localhost from your address (MySQL rights define what clients can connect to the server and from which machines)
4 Make sure you are both providing a password if needed and using the correct password for localhost connecting from the host address you're connecting from

[Close]

3条回答 默认 最新

相关推荐 更多相似问题