Reputation: 2614
I backed up my Cloud SQL V1 DB to a bucket and restored to a new 2nd-gen instance. Connecting via the console works fine. I can select, look at procs etc. Connecting to it from my Java GAE app doesn't. The GAE app and the Cloud SQL DB are in the same project.
I get these values in the logs:
GAE log:
java.sql.SQLInvalidAuthorizationSpecException: Not authorized to access instance: xxxx
SQL log:
[Warning] User 'root'@'%' was assigned access 0x1fffffff but was allowed to have only 0x1fff7dff.
Any tips?
Upvotes: 0
Views: 287
Reputation: 5126
Make sure your JDBC URL uses the jdbc:google:mysql://
prefix and not the old/deprecated jdbc:google:rdbms://
prefix.
While jdbc:google:rdbms://
continues to work for First Generation instances, it won't work when connecting to Second Generation instances. jdbc:google:mysql://
will work for both.
Upvotes: 1