3

How does one change the TCP Port on a Google Cloud SQL instance.

The Google MySQL server is listening on Port:3306. This will not work in my environment; the port number needs to be different.

I do not see how to change this in Developers Console - Cloud Storage.

I do see documentation for Networking and Firewalls, and it seems TCP Port settings are handled with VM Instances. But I don't understand the relationship between the Cloud SQL instance and the VM instance.

2 Answers 2

3

The port on a Cloud SQL instance cannot be changed. There isn't any relationship between Cloud SQL and Google Compute Engine VMs and their firewall configurations.

Sign up to request clarification or add additional context in comments.

1 Comment

"There isn't any relationship between Cloud SQL and Google Compute Engine VMs" I was confusing two services.
3

Unfortunately, it is not possible to change the port to which the Cloud SQL instance is listening.

Google Cloud SQL is essentially a wrapper for a MySQL server. It exposes all the same features except operating system access and file system access. Configuring the port requires either changing some environment variables as shown in 'Setting Environment Variables' or modifying the MySQL configuration files as shown in 'Using Option Files'.

If you really need to use a different port, your best bet within the Google Cloud Platform is to use a Compute Engine VM instance and install your own MySQL server on that. You will however, have to manage your own backups, SSL, etc.

A quick look a Google's public issue tracker reveals no feature requests filed to add this functionality to the SDK.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.