Spring properties configuration file problem
error message
Spring loads JDBC Error in properties content, original configuration file:
Error message:
Solution:
When connecting to the database, the role name of root should be root@localhost. The role name of root reporting error here is Sang@localhost , sang here is the user name of idea. When idea loads root, it automatically replaces root with sang, so use Sang@localhost An error will be reported when connecting to the database.
Solution 1: modify the configuration file to
driver=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost:3306/hellospring?serverTimezone=UTC
user=root
password=123456
Modification method 2: modify the configuration file to
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/hellospring?serverTimezone=UTC
jdbc.username=root
jdbc.password=123456
Similar Posts:
- [Solved] Mybatis-config Error: Cannot load connection class because of underlying exception: com.mysql.cj.exceptions.WrongArgumentException: failed to parse the connection string near ‘;useUnicode=true&
- Springboot Error: Failed to configure a DataSource: ‘url’ attribute is not specified and no embedd
- MySQL connection error no suitable driver found [How to Solve]
- [Solved] MySQL Error: com.mysql.cj.jdbc.util.TimeUtil.loadTimeZoneMappings(TimeUtil.java:163)
- Failed to obtain JDBC Connection
- [Solved] MYSQL Error: this authentication plugin is not supported
- MySQL Connect Error: Authentication plugin ‘caching_sha2_password’ cannot be loaded
- Linux Login MYSQL Error: ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
- [Solved] Access denied for user ‘Administrator’@’localhost’ (using password: YES)
- SSM Project Error: java.sql.SQLException: Access denied for user ‘????…§’@’localhost’ (…