Using a local MySQL instance for developing on Google Cloud SQL

This keeps giving me trouble, but I think I have it figured out now. Most of the cloud sql docs assume that you will be running your development on a cloud instance along with your production/test. This does not work for me due to the latency associated with the remote dbs, so I go for the local dev option. However in order to get this to work you have to put a copy of the mysql jdbc driver into this folder in your sdk:

eclipse\plugins\com.google.appengine.eclipse.sdkbundle_1.6.4.v201203300216r37\appengine-java-sdk-1.6.4\lib\impl
(obviously your exact folder will vary depending on your sdk bundle version)

Whenever you upgrade your SDK you will need to copy the mysql connector jar to the new impl directory.

The latest upgrade to the SDK (1.65) appears to have been a bit panicked. It was released on the evening of the 1.64 release. Oops. There was no eclipse plugin for 1.65. I made the mistake of upgrading the standalone version of the SDK (which I don't in fact use) and copying the jar in there.

The bottom line is that if you use eclipse for your Cloud SQL app development don't bother with the standalone SDK. Use the plugin one and copy that jar file into the impl directory as soon as you upgrade.
I am sure Google will upgrade the plugin to 1.65 soon enough. And more importantly I hope they either document this issue properly, or include the mysql in the standard distros.

Comments

Popular posts from this blog

Building a choropleth map for Irish agricultural data

Early Stopping with Keras

AutoCompleteTextView backed with data from SQLite in Android