- Learning Google BigQuery
- Thirukkumaran Haridass Eric Brown
- 225字
- 2021-07-02 21:24:04
Connecting using a proxy script
Google provides a proxy script for Windows, macOS, and Linux OS for connecting tot he MySQL instance on Google Cloud. The following section provides an overview of how to install and setup the proxy script for various OS:
- For Windows, download the setup file from the link shown here: https://dl.google.com/cloudsql/cloud_sql_proxy_x64.exe.
- For Linux, download the script using the following command from the Terminal and make it executable using the command in the second line:
wget https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64 -O cloud_sql_proxy
chmod +x cloud_sql_proxy
- For macOS, download the script using the following command from the Terminal and make it executable using the command in the second line:
curl -o cloud_sql_proxy https://dl.google.com/cloudsql/cloud_sql_proxy.darwin.amd64
chmod +x cloud_sql_proxy
- Run the proxy script with the following parameters. The instance parameter accepts both the Cloud SQL instance name and IP address:
./cloud_sql_proxy -instances=<ip address or instance name>=tcp:3306
- If the proxy starts successfully, the message shown in following screenshot will appear. If the port 3306 that is used by the proxy is already in use by your local instance, then stop the local instance if you can or use a different port for the proxy:

- Open another Terminal and connect to the Cloud SQL instance using the following command; execute the following commands to see the objects in the server:
mysql --host=<server ip> --user=root --password
show databases;
use EmployeeMgmt;
show tables;
SELECT * FROM EmployeeDetails;
quit;
推薦閱讀
- jQuery Mobile Web Development Essentials(Third Edition)
- Intel Galileo Essentials
- Hands-On Machine Learning with scikit:learn and Scientific Python Toolkits
- Power Up Your PowToon Studio Project
- 動手玩轉(zhuǎn)Scratch3.0編程:人工智能科創(chuàng)教育指南
- The React Workshop
- Processing互動編程藝術(shù)
- Java程序設(shè)計與實踐教程(第2版)
- Android 應(yīng)用案例開發(fā)大全(第3版)
- 微服務(wù)架構(gòu)深度解析:原理、實踐與進階
- Unity 3D/2D移動開發(fā)實戰(zhàn)教程
- Learning YARN
- Practical Game Design with Unity and Playmaker
- Learning AWS
- Android系統(tǒng)下Java編程詳解