Google has launched an API to enable users of its Cloud SQL to manage their databases programmatically.
Google Cloud SQL, which was originally available in October 2011, but only in limited preview, lets you run MySQL databases in Google's cloud. According to its website, it enables you to:
“Use a fully managed service to maintain and administer your databases, so you can focus more on building your applications and worry less about database management.”
In terms of the way you connect to your databases, the choices start with the basic command prompt or a SQL prompt in Google’s API console that you can use to execute basic SQL statements. Admin and reporting tools that support JDBC connections should work, but the ability to use Google Apps Script’s Jdbc Service, or Google App Engine Java SDK or Python SDK will probably prove more useful for developers. External applications will also be able to connect using JDBC.
Google has now supplemented Cloud SQL with an experimental JSON API. This gives you a RESTful interface that you can use to manage MySQL databases from your applications. The interface gives you the main administrative options for managing MySQL, so you can create or delete databases, start and restart instances, restore a database from backup, and import and export data.
The current service does have some restrictions; there’s a size limit of 100GB for individual instances, and MySQL replication isn’t supported. More minor restrictions are a lack of support for User Defined Functions, and no support for the following MySQL statements and functions:
- LOAD DATA INFILE
- SELECT ... INTO OUTFILE/DUMPFILE
- INSTALL/UNINSTALL PLUGIN ...
- CREATE FUNCTION ...
However, the API does provide a way to administer database instances programmatically and as such is another step forward with Google's move into the cloud.