How to run MySQL on GCP?

Pradeep Gupta
2 min readFeb 5, 2024

--

MySQL can be integrated with Google Cloud Platform (GCP).

Let’s get started on How to run Mysql on GCP.(cloud SQL)

GCP overview

To start Mysql on GCP, we need to set-up account on GCP and create a project.

After successfully creating account and setting up billing.

On search-box, type and click on SQL.

We need to create instance, and chose the required versions and options according to your project requirement.

. create instance ID(you can’t edit later) and password

Note down the instance name.(we will need to connect to GCP).

Create instance and then activate cloud shell.(It will take a while).

To activate cloud shell: click on shell button.

Now your cloud shell is ready.

Let’s connect google cloud to our project and add users to it to MySQL.

to connect to project: gcloud config set project [proect_ID]

to connect to users: gcloud sql connect [instance] — user=root

Now you are good to good with MySQL.

mySQL is ready.

--

--