This page describes how to get started with Google Cloud SQL by:
- Creating a Google Cloud SQL instance
- Configuring a Google Cloud SQL instance
- Connecting to a Google Cloud SQL instance
You can also watch the video on this page which covers the same concepts. The video shows you how to create a Google Cloud SQL instance, configure it, and then connect to it from standard tools and from applications running on App Engine and Compute Engine.
Creating a Google Cloud SQL instance
- Go to the Google Developers Console.
- Create a new Developers Console project, or open an existing project.
- In the sidebar on the left, select Cloud SQL to open the Cloud SQL control panel for the project.
- Click New Instance to create a new Cloud SQL instance in your project.
- Enter a name for the instance. The instance name will be automatically combined
with your project name, and any domain-specific names as shown here:
- Optionally, continue to configure the instance. Or, to accept the default
values for the instance settings, skip this step.
- Select a Region for your instance, either United States (default), European Union, or Asia. Your database, backups, and all replicated data will be stored in a zone in the region you select. All Cloud SQL instances in the United States are run in the US-Central region in order to provided lower latencies from both Google Compute Engine and Google App Engine.
- Configure Resources and Billing options, which includes selecting a tier for your instance and a billing plan. The default values are the D1 tier and per use billing. For more information about tiers and billing plans, see Packages Billing Plan.
- Configure a Backup Window. By default, your instance is backed up once a day. For more information about how to change the backup schedule and disable backups, see Scheduling Backups.
- Select a Replication mode, either synchronous (default) or asynchronous. For information about the difference between the two modes, see the FAQ.
- If you will connect to the instance from an external network, assign an IP address to your instance and whitelist external IP addresses in the Assign IP Address section. Using standard MySQL tools, you can then connect to your instance from the whitelisted addresses. For more information, see Configuring Access Control for IP Connections.
- If you have Google App Engine applications that will connect to your instance, add them in the Authorized App Engine Applications section. You can add or remove applications from this list at any time. For more information, see Configuring Access for App Engine Applications.
- Click Confirm to create the instance.
That's it! You have created your Google Cloud SQL instance.
Configuring a Google Cloud SQL instance
For information about managing your Google Cloud SQL instance, see:
- Configuring Access
- Setting a Root Password
- Creating, Editing, Deleting, and Restarting Instances
- Configuring SSL for an Instance
- Viewing Information about an Instance
- Importing and Exporting Data
- Scheduling and Restoring Backups
Connecting to a Google Cloud SQL instance
You can connect to a Google Cloud SQL instance in the following ways:
- Using MySQL Client
- From Admin and Reporting tools
- From External Applications
- From Google Apps Script scripts
- From App Engine Java applications
- From App Engine Python applications
- From App Engine PHP applications
- From App Engine Go applications