1
votes

I've been playing with App Engine and Cloud SQL - so far, so good. I've gotten everything to work running on my local enviroment. Both the app and database. I've also been able to use Google Cloud SQL on my local app server by using the assigned IP address to the MySQL server.

My problem is that when I deploy the app to GAE, I cannot get database access to work at all. I've been following this tutorial: https://developers.google.com/appengine/docs/java/cloud-sql/

It suggest the following structure for jdbc selection:

if (SystemProperty.environment.value() ==
SystemProperty.Environment.Value.Production) {
// Load the class that provides the new "jdbc:google:mysql://" prefix.
Class.forName("com.mysql.jdbc.GoogleDriver");
url = "jdbc:google:mysql://your-project-id:your-instance-name/guestbook?user=root";
} else {
// Local MySQL instance to use during development.
}
Class.forName("com.mysql.jdbc.Driver");
url = "jdbc:mysql://127.0.0.1:3306/guestbook?user=root";

I'm absolutely certain that I'm using the right project-id, instance name and database name, since I'm able to verify this from the Eclipse Google plugin.

Anyone with a clue as to what I'm missing? Also, a suggestion on how to debug this might be very helpful.

1

1 Answers

0
votes

Can you check if you have you enabled the MySQL Connector/J