2
votes

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.

3

3 Answers

2
votes

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.

2
votes

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.

0
votes

The Amazon RDS can change port,New user free for 1st year,