Grushton94
Grushton94

Reputation: 613

MySql "can't connect to MySQL server on xxxxx (10051)" Google SQL

I am trying to connect to my google sql instance via mysql workbench, but using both the IPv6 and IPv4 addresses result in "Can't connect to MySQL server on (the address) with user root" The IPv4 attempt gives me the error code (10061) and IPv6 gives me the error code (10051). Can this be a firewall issue?

I have tried with and without ssl and allowed my ip address access in the google sql setting. I have searched for what these error codes mean, but can't seam to find them. a better error message would be more helpful.

Upvotes: 2

Views: 14471

Answers (2)

David
David

Reputation: 9711

The IPv4 error sounds like you have specified an incorrect IP address or port. Make sure you are using port 3306 and the IP address that is assigned to your instance. You might also see this error if your have a corporate firewall that blocks outbound connections on port 3306.

The IPv6 error sounds like your workstation does not have a IPv6 connection to the internet.

Upvotes: 1

goldsoft1206
goldsoft1206

Reputation: 65

You need to add your public ip to "Allowed Networks" settings of Google SQL.

Please check this document - https://cloud.google.com/sql/docs/access-control

Upvotes: 0

Related Questions