Table of Contents

MySql - Google Cloud Platform Database Creation and Connection

About

Article about the connection to a MySQL GCP (Google Cloud Platform) database with:

Steps

Create your database and get your public IP

Gcp Sql Gerardnico Public Ip

Add IP authorization

for a private network

For a private network for instance your home …

Whatsmyip

Gcp Sql Authorized Network

where the network id is given with the CIDR notation where:

for a public network

For a public network, if you want to authorize any server in case of faas solution or in paas, just add the entire world with the following CIDR 0.0.0.0/0.

Gcp Sql Connection Public Network

Add SSL

The traffic will go through public network, you need therefore to use SSL in order to encrypt the traffic and before all the login/password.

Create a Client Certificate:

Gcp Sql Connection Client Certificate

You got three files:

Put the private key in a secure place.

Connection

Dbeaver

Dbeaver Gcp Mysql Connection

Dbeaver Connection Ssl Gcp

Dbeaver Gcp Mysql Schemas Default

MySQL Cli

For a connection with the mysql cli, see MySQL - SSL connection