Saturday, August 29, 2026
HomeC#Working with MySQL Database in Google Cloud Platform ~ IT Tutorials with...

Working with MySQL Database in Google Cloud Platform ~ IT Tutorials with Instance


On this article, we’ll study create MySQL Database and use gcloud CLI to create databases, tables, and run queries on database objects. 

Just a few Articles, which I already wrote and is likely to be useful for you if you’re starting with Google Cloud Platform are:

Let’s Start:

Step 1: Log in with Google Cloud Platform by visiting https://console.cloud.google.com/ (Google gives $300 as a free trial, however for that, you want to hyperlink your bank card).

As soon as logged in you’ll be redirected to Google Cloud Dashboard as proven within the under picture.

Step 2: You may view the menu checklist of Google Cloud Merchandise and Providers by clicking on the Navigation menu on the left aspect as highlighted. Go to the SQL menu possibility as proven within the under picture.

Step 3: Click on on Create Occasion button as proven within the under picture.

Choose the database engine for which you need to create the occasion. I’m deciding on MySQL for demonstration.

Present the Occasion Id, Password, Database engine, Area, and zonal availability whereas creating the brand new MySQL Occasion.

Choose the zonal availability and click on on the Create Occasion button.

Step 4: You will note the occasion id with the inexperienced tick icon as soon as the occasion is prepared.

Now open the google cloud shell by clicking on the Cloud shell icon within the prime proper nook as proven within the under picture.

Run the under command in gcloud CLI to attach with MySQL Occasion with the basis consumer.

You will note a dialog for Authorizing Cloud Shell. Click on on the Authorize button and supply the credential which was handed through the MySQL Occasion creation.

You will note that MySQL is linked with a command-line shell.

Step 5: Let’s attempt to create a database utilizing the “create database <DB_NAME>” command.

Change to the database utilizing the “use <DB_Name>” question.

Let’s add a desk named Customers within the MySQL Database created within the above steps.

Insert pattern knowledge within the desk utilizing the Insert command as proven under.

Now run the Choose question to view the data inserted within the desk.

You can too create the database from the Google Cloud Platform Person Interface by clicking on the Database menu possibility as proven within the under picture. Customers may also be created by clicking on the customers’ menu and offering the entry particulars like limiting the host by IP Handle or handle vary.

I hope this text will enable you in creating and dealing with the MySQL database.

Thanks

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments