Tuesday, December 6, 2011

Re: Is is possible to access Google Cloud SQL while running locally?

Lets take scenario #3 first.
I think your local mysql server have reached its value of max connection. You can check the value of max connection of your mysql server with this query:

mysql> select @@global.max_connections;

If you find this value low, then you can change it to a large value with this query::

mysql>set @@global.max_connections = 1000;  

That might solve your MySQLNonTransientConnectionException.

Now to your scenario #2. Have you try and run your select query to cloud-sql web interface? Is it selecting your table there? If the query is working there then there is no problem with the query. Try to eliminate PreparedStatement object like :: ResultSet rs = c.createStatement().executeQuery("your query string here");

---Abhishek

No comments:

Post a Comment