解决MySQL错误:java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: YES)

1. Wrong username or password: Please make sure you are using the correct username and password, and open the yml configuration file or the properties configuration file. 

 

2. Insufficient privileges: Please ensure that the user has sufficient privileges to connect to the MySQL database.

3. The MySQL service is not started: Please make sure the MySQL service is running.

Right-click this computer, manage, service and application, find the MySQL service, and check whether the status is running.

 

4. Incorrect database connection string: Please ensure that the database connection string used contains the correct hostname, port number, and database name.

Guess you like

Origin blog.csdn.net/lzl770880/article/details/129986314