java.sql.SQLException: Access denied for user 'root'@'
时间: 2023-08-30 10:04:53 浏览: 137
记录因为yml而产生的坑:java.sql.SQLException: Access denied for user ‘root’@’localhost’ (using password: YES)
根据您提供的引用内容,这个错误是由于MySQL数据库用户名错误导致的。具体来说,用户名应为"root",而您输入的用户名可能有误。解决步骤如下:
1. 检查配置文件中的用户名是否为"root"。您可以找到配置文件并确认其中的数据库用户名设置是否正确。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [解决java.sql.SQLException:Access denied for user ‘root ‘@‘localhost‘的报错](https://blog.csdn.net/sunyingboaini/article/details/124490810)[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^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: YES)](https://blog.csdn.net/Mason_Chen/article/details/127090275)[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^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [解决java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: YES)](https://blog.csdn.net/qq_42248989/article/details/124198227)[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^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文