Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Matt's answer helped me a lot, I believe this is a more complete explanation.</p> <p>I can verify that you can get a local MYSQL instance to work with Google App Engine running in development mode, so as not to incur the upcoming costs associated with the Cloud SQL option from Google, while developing.</p> <p>First, as Matt said you have to put the mysql-connector jar into the APPENGINE_HOME/lib/impl.</p> <p>I am on windows. I did this by first finding where my SDK resides. In my project in eclipse in package explorer I right click on "App Engine SDK[App Engine - 1.6.4]", I select Properties from the drop down menu, and in the resulting pop up click the blue "Configure SDKs..." link.</p> <p>This reveals the location of my App Engine SDK. Go to that folder in a Windows Explorer window, open lib/impl and drop in your mysql-connector jar, copied from your GAE eclipse project. My path was:</p> <p>C:\Software\eclipse\plugins\com.google.appengine.eclipse.sdkbundle_1.6.4.v201203300216r37\appengine-java-sdk-1.6.4\lib\impl</p> <p>Per the instructions here (https://developers.google.com/eclipse/docs/cloudsql-createapp) you are supposed to leave your java code connection string pointed at prod (jdbc:google:rdbms://... instead of jdbc:mysql://...) BUT you need to go into Eclipse project properties, Google, App Engine, Google Cloud SQL and under "Development SQL instance (used by local development server)" select the radio button "Use MySQL instance". Next time you launch GAE the connection string in your java code will be ignored in favor of your local MySQL host. </p> <p>Make sure MySQL service is running and you are good to go.</p> <p>This took me longer to figure out than it should have. I think the key is from the Google Docs, if you don't understand / use this information you will try and use a mysql jdbc string and run into socket permission errors because GAE can't go to port 3306 unless you do as I describe:</p> <blockquote> <p>You do not need to explicitly connect to the Development SQL instance in your code - this is done for you automatically when you run your application in the development server. The development SQL instance to connect to is passed automatically to your development server via VM arguments by GPE at runtime.</p> </blockquote> <p>(I uploaded 4 images to help with this explanation and only after I finished does it tell me you need 10 reputation points to load images--jeesh)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload