To manage a database, you can either use an existing instance or add a new instance.
Before You Begin
-
To discover database instances, enable the Cloud SQL Admin and Cloud Resource Manager APIs in the project where service account is hosted.
-
Your Google account must contain the following permissions to access the Google resources:
Role
Title
Description
Permissions
Lowest Resource
roles/cloudsql.viewer
Cloud SQL Viewer
Provides read-only access of Cloud SQL resource.
cloudsql.backupRuns.get
cloudsql.backupRuns.list
cloudsql.databases.get
cloudsql.databases.list
cloudsql.instances.export
cloudsql.instances.get
cloudsql.instances.list
cloudsql.instances.listServerCas
cloudsql.sslCerts.get
cloudsql.sslCerts.list
cloudsql.users.list
resourcemanager.projects.get
resourcemanager.projects.list
serviceusage.quotas.get
serviceusage.services.get
serviceusage.services.list
Project
Procedure
-
From the navigation pane, go to Protect > Databases.
The Databases page appears.
-
Click Add instance, and then select Cloud database service.
The Add Cloud DB instance page appears.
-
From the Vendor list, select Google Cloud Platform and then click Next.
The Configure Google Cloud Database page appears.
-
From the Select A Database Service list, select MySQL and then click Next.
The Configure Google Cloud Database - MySQL page appears.
-
For Select A Plan, select a server plan and then click Next.
-
For Cloud Account, select an existing cloud account or create a new cloud account by clicking Add
, and then click Next. -
For Cloud Database Instance Details, do the following:
-
For Instance name, select an instance.
-
In the Database user field, type the user name to access the Cloud SQL for MySQL application.
-
In the Password field, type the password to access the Cloud SQL for MySQL application.
-
If SSL is enabled on the cloud, move the Use SSL options toggle key to the right, and then do the following:
-
In the SSL CA file field, provide the SSL CA file path on the proxy computer.
-
In the SSL Cert file field, provide the SSL certificate file path on the proxy computer.
-
In the SSL Key file field, provide the SSL key file path on the proxy computer.
-
-
Click Next.
-
-
Click Add.
Results
- The new instance contains a default database group. The default database group includes all the data in the Google Cloud SQL for MySQL database. You cannot delete the default database group.