且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

MySQL Workbench:“无法连接到127.0.0.1'(10061)上的MySQL服务器"错误

更新时间:2023-01-20 13:45:25

也许不允许您启动"MySQL 55"服务.将服务"MySQL 55"的登录信息设置为本地!

要查看Windows 7中的可用服务列表,请执行以下操作:

  1. 打开运行框
  2. 键入services.msc并按回车键.
  3. 找到服务MySQL55
  4. 右键单击MySQL55本地服务将显示属性->登录

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

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

To see the list of aviable services in Windows 7:

  1. Open a run box
  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