Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



  • Fully managed, highly available relational databases. Create, configure, and use MySQL databases that live in Google's Cloud. We manage replication, encryption, patch management, and backups, so you focus on your applications and services.

  • Easy to use, flexible configuration. Create, configure, manage, and monitor your database instances with just a couple of clicks in our console or using a command line tool. Manage your instances using any applications and tools you already use with MySQL.

  • Exceptional security and integration with Google Cloud. All data is encrypted when stored and in flight on Google's network. Connections to instances are accepted only from authorized IP addresses, and can be secured with SSL, and MySQL user grants can control access at the database, table, or even column level. All data is replicated multiple times in multiple locations for great durability and availability. Databases can be created in the United States, European Union, or Asia.

    Cloud SQL is tightly integrated with Google App Engine , Compute Engine , Cloud Storage , and other Google services, so you can work across multiple products easily, get more value from your data, move your data into and out of the cloud, and get better performance.


Try it now
  1. Sign up

    1. If you don't already have one, sign up for a Google account .
    2. Create a Cloud SQL enabled project via the Google Developers Console .
    3. Enable billing from your project's Billing & Settings tab.
  2. Create and configure a Google Cloud SQL instance

    Google Developers Console

    1. In the left sidebar, click STORAGE , and then click Cloud SQL .
    2. Click New Instance .
    3. Enter a name for the instance and click Confirm .
    4. After the instance is running, click Access Control and then:
      1. Click Request an IP Address and use this as your instance-IP in Step 3.
      2. In the Set Root Password box, enter a root password, and click Set .
      3. Click Add Authorized Network and add your IP address .

    Cloud SQL Command Line

    1. Install the Cloud SDK .
    2. Use the following command to create an instance:
      $ gcloud sql instances create your-instance-name
    3. Modify the instance and grant access to your IP address :
      $ gcloud sql instances patch your-instance-name --authorized-networks your-ip-address
    4. Set the root password for the instance:
      $ gcloud sql instances set-root-password your-instance-name --password-file path-to-file
    5. Assign an IP address to the instance and retrieve it:
      $ gcloud sql instances patch your-instance-name --assign-ip
      $ gcloud sql instances get your-instance-name

      In the output, find the "ipAddress" field. Use this as your instance-IP in Step 3.

  3. Connect to the instance

    1. Install the MySQL Client .
    2. Connect to the instance.
      $ mysql --host=instance-IP --user=root --password
    3. Create a database and table, enter some data, and query the data.
      CREATE DATABASE guestbook;
      USE guestbook;
      
      CREATE TABLE entries (guestName VARCHAR(255), content VARCHAR(255),
        entryID INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(entryID));
      INSERT INTO entries (guestName, content) values ("first guest", "hello world!");
      
      SELECT * FROM entries;
  4. What next?

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.