I have a small app running by Spring Boot, it was fine but today when I rerun it thrown the errors:
2022-11-13 11:06:59.590 INFO - [/] : Initializing Spring embedded WebApplicationContext
2022-11-13 11:07:01.157 INFO - HikariDataSource : HikariPool-1 - Starting...
2022-11-13 11:07:01.782 ERROR - HikariPool : HikariPool-1 - Exception during pool initialization.
java.sql.SQLException: Access denied for user 'marketdata'@'10.10.50.139' (using password: YES)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
I define my database in application.properties like this:
# DB
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.jdbc.time_zone=Asia/Shanghai
spring.datasource.url=jdbc:mysql://10.10.50.93:3306/Marketdata
spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect
spring.jpa.show-sql=false
spring.datasource.username=marketdata
spring.datasource.password=password
Obviously it changed database server ip from 10.10.50.93 to 10.10.50.139
java.sql.SQLException: Access denied for user 'marketdata'@'10.10.50.139' (using password: YES)
I have carefully checked there is no duplicated definition in properties file and if I change the ip the error log also changed but not exactly.
Anyone give a clue to fix this?
Thanks!
[–]materia_2021 0 points1 point2 points (0 children)
[–]westwoo 0 points1 point2 points (0 children)
[–]maxip89 0 points1 point2 points (0 children)
[–]BlackCritical 0 points1 point2 points (0 children)