Description
Feature Description
It is confusing that it uses port 3307 as serverProxyPort
, because it resembles the MySQL port number and is some times used for the local mysql port (if 3306 is unavailable).
GoogleCloudPlatform/cloud-sql-proxy#1841 (comment)
So maybe the server side proxy component should be using a port number that does not resemble any of the ports normally used by the databases (are the proxy components using ssh, then maybe just 22 or a port number resembling ssh, for instance 2222).
cloud-sql-go-connector/dialer.go
Line 47 in 68a58cd
Sample code
serverProxyPort = "2222"
ln, err := tls.Listen("tcp", ":2222", &tls.Config{
This would also require a change in the server code.
It would probably require the connector to try to first connect to 2222 and then fall back to 3307, in case the server has not been launched with the new port yet.
The server code would probably listen to both ports, while updating all the connectors.
Alternatives Considered
This could also instead be remedied by a better error message when the connector cannot connect to the server.
Additional Details
No response