Access denied for user 'root'@'127.0.0.1' (using password: YES)
时间: 2023-08-09 21:10:27 浏览: 169
这个错误提示是因为在使用Navicat连接MySQL时,使用的用户名为root,密码为YES,但是被拒绝了。这个问题可能有几种原因。首先,根据引用\[1\]和引用\[2\],可能是因为在连接MySQL时输入的密码不正确。你可以尝试重新输入密码,确保密码的正确性。其次,根据引用\[3\],可能是因为在连接MySQL时使用的是127.0.0.1而不是localhost。在MySQL中,使用127.0.0.1是通过TCP/IP协议连接到本机的,而使用localhost是通过Unix Socket连接到本机的。你可以尝试在my.cnf的\[mysql\]区域里设置protocol=tcp,来默认选择TCP/IP的连接方式,或者为localhost设置一个密码。希望这些解决方法能够帮助你解决问题。
#### 引用[.reference_title]
- *1* [docker 容器运行mysql 登录时报错 1045 - Access denied for user root@127.0.0.1 (using password:yes)](https://blog.csdn.net/qq_33743572/article/details/106630950)[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^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [navicat,idea连接示1045 - Access denied for user ‘root‘@‘127.0.0.1‘ (using password:Yes)](https://blog.csdn.net/weixin_44446230/article/details/126862377)[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^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [【MySQL】Access denied for user 'root'@'127.0.0.1' (using password: YES)解决方法](https://blog.csdn.net/sunset108/article/details/48418107)[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^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文