I have two VM instances in google cloud console connecting to the same cloud SQL database, with no issues. I created a new instance and I can't connect it to the cloud SQL. The new instance was created as follows:
- Clone an existing instance that works with the database.
- Add the new ephemeral IP to the list of authorized networks of the database.
- SSH to the new instance and connect to mysql with the same command that works on the other two instances.
Mysql connection is denied for the user:
$ mysql -u <user> -p -h <cloudSQL IP>
Enter password:
ERROR 1045 (28000): Access denied for user 'user'@'IP' (using password: YES)
Am I missing something? I have followed the documentation and I can't find any similar issue.