Skip to content

Connect to Google Cloud SQL for MySQL from Mac

Choose a direct database connection or an existing local Cloud SQL Auth Proxy before filling in TableAI’s connection form.

You need a Cloud SQL for MySQL instance, a database account, and a permitted route. If you use the Auth Proxy, have it running with a TCP listener on your Mac.

Route Address to use Access to check
Direct public connection Instance public address and database port Your client IP in authorized networks
Direct private connection Instance private address and database port A route into the private network
Local Auth Proxy Proxy listener, such as 127.0.0.1, and its local port Proxy authorization and connectivity to the instance

Obtain the database name and database account separately. The instance connection name identifies the instance to the proxy; Host in TableAI takes the proxy’s TCP address.

Google documents direct client connections and the Auth Proxy. A proxy using private IP still needs a route to that private network.

Connect to Google Cloud SQL for MySQL from Mac

Section titled “Connect to Google Cloud SQL for MySQL from Mac”
  1. Open a new connection with Driver › MySQL.
  2. Enter the Host and Port for your chosen route.
  3. Fill in Database, User, and Password.
  4. Configure TLS for that endpoint as described below.
  5. Click Test, then Save & Connect after success.

For direct access, use the instance’s required certificates in the SSL/TLS fields. Verify Full uses a DNS hostname that matches the server certificate. Verify CA checks the certificate chain for a connection configured with an IP address.

For a local Auth Proxy, match SSL Mode to its local listener. The proxy manages encryption from itself to Cloud SQL; TableAI connects to the local endpoint.

Use an SSH tunnel if your private route goes through an SSH server.

connection refused
Access denied for user

For a refused local connection, check that the proxy is running on the port in TableAI. For direct public access, check authorized networks. For private access, check the route from the client or proxy to the instance.

Use error 1045 for database login failures, TLS certificate errors for certificate checks, or connection troubleshooting for timeouts.

Continue with write and run SQL, or return to the MySQL overview.