教程來自google文檔:https://cloud.google.com/sql/docs/mysql/connect-admin-ip#install-mysql-client
開始之前需要創(chuàng)建SQL 實例(instance)
1,注冊google cloud賬號(一年免費)
2,登陸后找到SQL

sql.png
3,創(chuàng)建實例

instance.png
4,進入創(chuàng)建好的實例后,選擇數(shù)據(jù)庫(database)標簽

db.png
云數(shù)據(jù)庫創(chuàng)建成功
進行第三方軟件連接
Using a local mysql client
1,安裝本地mysql client
我用的是windows 10的navicat連接,所以需要下載MySQL Community Server,link:http://dev.mysql.com/downloads/mysql/
The Community Server includes the MySQL client. MySQL Community Server包含了 MySQL client

msi.png
window 環(huán)境下推薦安裝msi格式,在指引下安裝。
2,安裝好client端后,需要配置google cloud sql 的允許訪問IP

antority.png
選擇授權(quán)標簽
3,在添加網(wǎng)絡(luò)中填入你的local IP,IP可在網(wǎng)上查詢,link:http://ipv4.whatismyv6.com/

addnet.png
配置完成,在本地連接
使用mysql自帶的client或第三方軟件都可以,這里使用navicat
1,找到你創(chuàng)建的cloud database的host,也就是IP,在概覽中

ip.png
復(fù)制該IP地址到navicat的host中

navi.png
這里的用戶和密碼是在創(chuàng)建用戶時設(shè)置的

user.png
進入后會有自動生成的3個系統(tǒng)數(shù)據(jù)庫,不用管,創(chuàng)建你自己的數(shù)據(jù)庫即可

bd2.png
接下來就是在navicat中創(chuàng)建Table了
good luck