Friday, May 11, 2012

Re: Problems keeping cloud and local mysql in sync

Hi Anthony

The Squirrel SQL client includes a db-diff plugin which I believe does what you require.
There are instructions on using Cloud SQL with Squirrel here: https://developers.google.com/cloud-sql/docs/admin_tools

J

On Fri, May 11, 2012 at 7:41 AM, Anthony Nolan <anthonynolan@gmail.com> wrote:
Hi, I am developing an app which will use Google Cloud SQL(GCS) for production (hopefully). I develop on mysql locally and try to keep the 2 databases in sync by running alter scripts on 'production' once I am happy with them on dev. This is fine in so far as it goes, but I would like to do a 100% comparison between the 2 databases before I go to production. I am aware that there is no simple technique provided for this, but have tried a number of ways to make this comparison and seem to be blocked at every hands turn.
Toad for MySql does comparisons - I have not used the mysql version yet, but based on experience with the Oracle one it will probably be good. It does not however allow you to connect to a database using jdbc (the only method that I know of for GCS). If I could get this to work I would be very happy as it would represent a very simple way of syncing the 2 databases.
My next path was to get a full dump of the mysql database from the cloud, get it on to my local machine and restore it to a new database. I could use toad to compare these, but have again been blocked as the database dump provided with GCS is just tables and data. No stored procedures are provided. Stored procedure differences are one of my main areas of concern, so this is a disappointment. 
I have also tried connecting to GCS with the google provided command line too, but also to no avail. It does not appear to let me do the full db dump that I require. It looks like a simple sql command line.
I consider the ability to compare databases crucial to working with GCS going forward. It is certainly not being made easy for me :(
I would appreciate if anyone can shed any light on this. 

Thanks,

Anthony Nolan




--
Joe Faith | Product Manager | Google Cloud

No comments:

Post a Comment