Host 'localhost' is not allowed to connect to this MySQL server
时间: 2023-12-23 11:41:27 浏览: 87
回答: 当出现 "Host 'localhost' is not allowed to connect to this MySQL server" 的错误提示时,主要原因是在操作过程中意外删除了 root 用户,并且使用 localhost 登录时会出现此错误。此外,也有一些用户在使用 MySQL 8.0.16 版本时遇到了同样的问题,尝试了删除和重装 MySQL,但问题依然存在。解决此问题的方法是,打开一个 cmd 窗口并输入 "net start mysql",但需要注意的是,自 MySQL 8.0 版本之后,在 my.ini 文件中直接添加 "skip-grant-tables" 会导致 MySQL 无法启动。这种方法可能对 MySQL 5.5 版本有效,但具体情况不明确。<em>1</em><em>2</em><em>3</em>
#### 引用[.reference_title]
- *1* [Host 'localhost' is not allowed to connect to](https://blog.csdn.net/SHENLINGSUIFENG/article/details/48138239)[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^v92^chatsearchT3_1"}} ] [.reference_item]
- *2* *3* [解决ERROR 1130: Host ‘localhost‘ is not allowed to connect to this MySQL server](https://blog.csdn.net/qq_45721173/article/details/119053873)[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^v92^chatsearchT3_1"}} ] [.reference_item]
[ .reference_list ]
阅读全文