[28000][1045] (conn=37744) Access denied for user 'root'@'192.168.35.174' (using password: YES)
时间: 2023-09-23 17:07:54 浏览: 70
这个错误信息表示访问mysql时遇到了访问被拒绝的问题。根据引用,解决这个问题的方法是授予'user'@'%'所有权限,并使用GRANT和FLUSH PRIVILEGES命令。具体的步骤如下:
1. 打开mysql命令行或者任何mysql客户端工具。
2. 使用root用户登录到mysql。
3. 运行以下命令给'user'@'%'授予所有权限,并设置密码:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '000000' WITH GRANT OPTION;
注意替换'000000'为你想要设置的密码。
4. 运行以下命令刷新权限:
FLUSH PRIVILEGES;
这些步骤将会授权给'user'@'%'所有的权限,并且刷新权限列表。这样,你应该能够以'user'@'192.168.35.174'的身份成功连接mysql了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [java.sql.SQLException: Access denied for user ‘root‘@‘192.168.100.1‘ (using password: YES)](https://blog.csdn.net/SartinL/article/details/107071726)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [Mysql: Access denied for user 'root'@192.168.48.10(using password:YES)](https://blog.csdn.net/weixin_42325841/article/details/84521660)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文