Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL Workbench: "Can't connect to MySQL server on 127.0.0.1' (10061)" error

I apologise.. I know this question has been asked many times before, but I've tried lots of suggestions, and simply can't find a solution.

The problem: I have a MySQL database running on a hosted server. I have to use SSH to connect to it, and I have the relevant Public and Private Key files.

I specifically want to use the PC version of MySQL Workbench, to access this database, for running queries, checking data, etc.

If I run Sequel Pro on a Mac, it connects fine, and I can browse and query the database. No problems.

If I run the trial version of SQLyog on a PC, it also connects fine. No problems.

But if I try to connect use MySQL's own "MySQL Workbench" application, using exactly the same settings and SSH Private Key file, it refuses to connect, throwing the well-known error:

Can't connect to MySQL server on 127.0.0.1' (10061)

I find it frustrating, as, in SQL Workbench, I specified the "MySQL Hostname" to use, db01.mysql.vm.MyHostingServer.net, but Workbench seems to ignore it, and demand to connect to 127.0.0.1 instead.

(I have read that Workbench says it needs the Public key file, but actually means the Private key file... and I have tried with both. I've also tried with MySQL Workbench on a Mac, but that crashed all over the place, simply when I was typing in server names and passwords.. it was a mess !!)

The hosting service I've gone with gives me limited permissions for changing MySQL settings, and given that Sequel Pro and SQLyog can connect successfully, I don't want to start messing about and changing things randomly.

Any ideas...?

like image 267
Mike Gledhill Avatar asked Jan 12 '12 08:01

Mike Gledhill


People also ask

Can not connect MySQL 10061?

The error (2003) Can't connect to MySQL server on ' server ' (10061) indicates that the network connection has been refused. You should check that there is a MySQL server running, that it has network connections enabled, and that the network port you specified is the one configured on the server.

Can not connect to MySQL server 10060?

The error 10060 is returned by the MySQL client when a connection could not be established with the service on the system you are connecting to. This is commonly caused by a firewall block or network issue preventing the connection.


1 Answers

Maybe you are not allowed to start the service "MySQL 55". Set the login information of Service "MySQL 55" as local!

enter image description here

To see the list of aviable services in Windows 7:

  1. Open a run box enter image description here
  2. Type services.msc and press return.
  3. Find the service MySQL55
  4. A right click of the MySQL55 Local Service shows Properties -> Log On enter image description hereenter image description here
like image 170
ja4 Avatar answered Oct 04 '22 16:10

ja4