Connect to Google Cloud SQL on the Command Line
Articles,  Blog

Connect to Google Cloud SQL on the Command Line

SPEAKER: Let’s take a quick
look at how to use Google Cloud SQL on the command line. Go to and
open up your Cloud console. Go to the SQL section. Here you can see your
Cloud SQL instances. If you don’t have a Cloud SQL
instance you can create one. Click your instance to be taken
to the Instance Overview page. Now go to the Access Control tab
and then go to the Users tab. Specify a new root password. If you don’t have the
Google Cloud SDK installed on your computer, see the
link in the description for how to install it. Now open your command
line and type gcloud beta SQL connect, the name of
your instance, and then the username root. Type in your password
and you’ll be greeted with the familiar
mySQL command line.


  • Paul Garcia

    disable the network card inside the virtual machine no longer let me in you know how I can enable the network and leave me again to the instance?

  • Dan Krueger

    We need to know how to access the MySql Cloud instance without using gcloud — meaning more traditional ways. Can we connect MySql Workbench to the instance? Can we send requests to and from our applications without gcloud? Why does all the documentation focus on this 'gcloud' connectivity via command line when no one uses command line to actually interact with their databases? I've already been through a lot of notes and I'm still trying to figure this out. I would think this basic functionality should have been anticipated as either 1) desired or 2) at least direct us from 'how we were accessing databases' to 'how cloud and its applications' access the databases.. Currently at about 8 hours into it, the Google Cloud SQL is still a lifeless brick…. I'm sure it will be cool once I figure it out… But why does figuring it out have to be so hard?

  • Dan Krueger

    Also what is this Whitelisting the IP about… Clearly there is something else that is layered with this database technology that is not explained well.

Leave a Reply

Your email address will not be published. Required fields are marked *