Skip to content

Improve error messages surrounding serverProxyPort port 3307 #632

Open
@runephilosof-karnovgroup

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).

serverProxyPort = "3307"

ln, err := tls.Listen("tcp", ":3307", &tls.Config{

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

Metadata

Metadata

Assignees

Labels

priority: p3Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions