Cloud SQL - Connection refused
Finally, I’m in that phase that I would like to use a database (currently I read the data from a file). I choose the Cloud SQL, MySQL combination. I registered an instance and it automatically added my project to the access table. After I copied the example java code into my DAO. Here I’m. When I run the app then I always get the Connection Refused error message. I haven’t found the solution yet.
Based on the description, it should be enough that the application id is in the access table. I think it is enough, because the GAE instance is in the same infrastructure than the database in PROD. Therefore, the connection string in java should be like a localhost connection. And the example code also contains a ‘jdbc:mysql://localhost/database?user=root’ connections string. I think it is approved. So, no more action is necessary.
‘These must be located in the same region.’ The AppEngine instance and the SQL instance are in the same region.
Now, I’m moving my project into a freshly created Google Web Application project. Because I have some issue about the project structure, I hope it will help.