I'm trying to connect a springboot project to a CLOUD SQL db and i go the error :
com.mysql.cj.exceptions.CJException: Access denied for user 'user'@'IP' (using password: YES).
and
SQL State : 08001 Error Code : 0 Message : Could not create connection to database server. Attempted reconnect 3 times. Giving up.
I tried to connect to this CloudSQL instance using the mysql-client with the same user ans passsword and it works perfectly.
Here is the springboot conf i'm using:
spring:
datasource:
url: jdbc:mysql://INSTANCE_IP/DB_NAME?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&autoReconnect=true&useSSL=false
username: USERNAME
password: PASSWORD
Has anyone an idea of what i am doing wrong ?