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.
问题是:我有一个MySQL数据库在托管服务器上运行。我必须使用SSH连接到它,并且我有相关的公钥和私钥文件。
I specifically want to use the PC version of MySQL Workbench, to access this database, for running queries, checking data, etc.
我特别想使用MySQL工作台的PC版本,访问这个数据库,运行查询,检查数据等等。
If I run Sequel Pro on a Mac, it connects fine, and I can browse and query the database. No problems.
如果我在Mac上运行Sequel Pro,它连接的很好,我可以浏览和查询数据库。没有问题。
If I run the trial version of SQLyog on a PC, it also connects fine. No problems.
如果我在PC上运行SQLyog的试用版,它也可以很好地连接。没有问题。
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:
但是如果我尝试连接使用MySQL自己的“MySQL Workbench”应用程序,使用完全相同的设置和SSH私钥文件,它拒绝连接,抛出众所周知的错误:
Can't connect to MySQL server on 127.0.0.1' (10061)
无法连接到127.0.0.1'的MySQL服务器(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.
我发现这令人沮丧,因为在SQL Workbench中,我指定了要使用的“MySQL主机名”db01. MySQL . lm . myhostingserver.net,但是Workbench似乎忽略了它,并要求连接到127.0.0.1。
(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 !!)
(我读过工作台说它需要公钥文件,但实际上是指私钥文件……)这两种我都试过了。我也尝试过在Mac上使用MySQL Workbench,但仅仅是在输入服务器名和密码时,它就崩溃了。真是一团糟!!
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.
我使用的托管服务为我提供了有限的权限来更改MySQL设置,而且鉴于Sequel Pro和SQLyog能够成功连接,我不希望开始乱放和随意更改。
Any ideas...?
任何想法……?
8 个解决方案
#1
16
Maybe you are not allowed to start the service "MySQL 55". Set the login information of Service "MySQL 55" as local!
也许您不允许启动“MySQL 55”服务。将“MySQL 55”服务的登录信息设置为本地!
To see the list of aviable services in Windows 7:
在Windows 7中查看可移动服务列表:
- Open a run box
- 打开一个运行框
- Type
services.msc
and press return. - 服务类型。msc和按下返回。
- Find the service
MySQL55
- 查找服务MySQL55
- A right click of the MySQL55 Local Service shows Properties -> Log On
- 右键单击MySQL55本地服务将显示属性——>登录
#2
4
Even I had same problem, The reason was mysql service was not getting configured properly, when I installed it through 'MySQL installer'. Also it was not starting, when I tried to start the service manually.
即使我也有同样的问题,原因是我通过“mysql安装程序”安装时,mysql服务配置不正确。当我尝试手动启动服务时,它也没有启动。
So in my case it seemed be a Bug with the 'MySQL Installer', as editing the install path to a different one when the 'Developer default' was selected, the problem occurs.
因此,在我的例子中,它似乎是一个“MySQL安装程序”的错误,当选择“Developer default”时,编辑安装路径到另一个安装路径,问题就出现了。
Solution (Not exactly a solution):
解决方案(不完全是解决方案):
- Uninstalled the MySQL all products (completely)
- 卸载MySQL所有产品(全部)
- Reinstalled, this time also I have selected 'Developer default', but didn't make any changes to the path or any thing. So the path was just 'C:\Program Files\MySQL' (the default one)
- 重新安装,这次我也选择了“Developer default”,但是没有对path或任何东西做任何更改。路径是C:\程序文件\MySQL(默认)
- And just clicked Next Next...
- 然后点击Next…
- Done, this time MySql was running fine.
- 这一次MySql运行良好。
#3
1
After making above improvement such as checking if mysql service
is running or not, you just need to give a small password while creating connection, it is ' '
or 1 time press on space-bar in case of GUI or workbench. After which you just need to validate your machine with server (validated HOST). For that purpose click on 'New Server Instance'
and it will configure server/HOST on your behalf itself.
在进行上述改进(如检查mysql服务是否正在运行)之后,您只需要在创建连接时提供一个小密码,在GUI或工作台的情况下,它是“”或一次按空格键。之后,您只需使用服务器(验证主机)验证您的机器。为此,单击“新服务器实例”,它将代表您自己配置服务器/主机。
I have done this successfully just a few couple of minutes ago. My workbench software is able to show all pre-installed databases
etc now.
就在几分钟前,我成功地做到了这一点。我的工作台软件现在能够显示所有预先安装的数据库。
hope it will work for you as well.
希望它对你也有帮助。
Thanks!!!
谢谢! ! !
#4
0
Try placing the host name (db01.mysql.vm.MyHostingServer.net
) in your windows host (C:\windows\system32\drivers\etc\host
) file along with it's IP address and port number and see if that helps.
尝试将主机名(db01.mysql.vm.MyHostingServer.net)放在您的windows主机(C:\windows\system32\驱动器\ \驱动器\ \ \ \ \主机)文件中,并附带它的IP地址和端口号,看看是否有帮助。
#5
0
If you have installed WAMP on your machine, please make sure that it is running. Do not EXIT the WAMP from tray menu since it will stop the MySQL Server.
如果您在机器上安装了WAMP,请确保它正在运行。不要从托盘菜单退出WAMP,因为它将停止MySQL服务器。
#6
0
To connect to a new server, you click on home + add new connection. Put IP or webserver URL in new connection.
要连接到新服务器,请单击home +添加新连接。在新连接中放置IP或webserver URL。
#7
0
Just try to run the following command manually:
只需尝试手动运行以下命令:
C:\wamp\bin\mysql\mysql5.6.17\bin\mysqld.exe --console
It worked for me :)
它为我工作:
#8
0
Ran into the exact same problem as OP and found that leaving the "MySQL Server Port" empty in the MySQL Workbench connection solves the issue.
遇到与OP相同的问题,发现在MySQL Workbench连接中保持“MySQL服务器端口”为空解决了这个问题。
#1
16
Maybe you are not allowed to start the service "MySQL 55". Set the login information of Service "MySQL 55" as local!
也许您不允许启动“MySQL 55”服务。将“MySQL 55”服务的登录信息设置为本地!
To see the list of aviable services in Windows 7:
在Windows 7中查看可移动服务列表:
- Open a run box
- 打开一个运行框
- Type
services.msc
and press return. - 服务类型。msc和按下返回。
- Find the service
MySQL55
- 查找服务MySQL55
- A right click of the MySQL55 Local Service shows Properties -> Log On
- 右键单击MySQL55本地服务将显示属性——>登录
#2
4
Even I had same problem, The reason was mysql service was not getting configured properly, when I installed it through 'MySQL installer'. Also it was not starting, when I tried to start the service manually.
即使我也有同样的问题,原因是我通过“mysql安装程序”安装时,mysql服务配置不正确。当我尝试手动启动服务时,它也没有启动。
So in my case it seemed be a Bug with the 'MySQL Installer', as editing the install path to a different one when the 'Developer default' was selected, the problem occurs.
因此,在我的例子中,它似乎是一个“MySQL安装程序”的错误,当选择“Developer default”时,编辑安装路径到另一个安装路径,问题就出现了。
Solution (Not exactly a solution):
解决方案(不完全是解决方案):
- Uninstalled the MySQL all products (completely)
- 卸载MySQL所有产品(全部)
- Reinstalled, this time also I have selected 'Developer default', but didn't make any changes to the path or any thing. So the path was just 'C:\Program Files\MySQL' (the default one)
- 重新安装,这次我也选择了“Developer default”,但是没有对path或任何东西做任何更改。路径是C:\程序文件\MySQL(默认)
- And just clicked Next Next...
- 然后点击Next…
- Done, this time MySql was running fine.
- 这一次MySql运行良好。
#3
1
After making above improvement such as checking if mysql service
is running or not, you just need to give a small password while creating connection, it is ' '
or 1 time press on space-bar in case of GUI or workbench. After which you just need to validate your machine with server (validated HOST). For that purpose click on 'New Server Instance'
and it will configure server/HOST on your behalf itself.
在进行上述改进(如检查mysql服务是否正在运行)之后,您只需要在创建连接时提供一个小密码,在GUI或工作台的情况下,它是“”或一次按空格键。之后,您只需使用服务器(验证主机)验证您的机器。为此,单击“新服务器实例”,它将代表您自己配置服务器/主机。
I have done this successfully just a few couple of minutes ago. My workbench software is able to show all pre-installed databases
etc now.
就在几分钟前,我成功地做到了这一点。我的工作台软件现在能够显示所有预先安装的数据库。
hope it will work for you as well.
希望它对你也有帮助。
Thanks!!!
谢谢! ! !
#4
0
Try placing the host name (db01.mysql.vm.MyHostingServer.net
) in your windows host (C:\windows\system32\drivers\etc\host
) file along with it's IP address and port number and see if that helps.
尝试将主机名(db01.mysql.vm.MyHostingServer.net)放在您的windows主机(C:\windows\system32\驱动器\ \驱动器\ \ \ \ \主机)文件中,并附带它的IP地址和端口号,看看是否有帮助。
#5
0
If you have installed WAMP on your machine, please make sure that it is running. Do not EXIT the WAMP from tray menu since it will stop the MySQL Server.
如果您在机器上安装了WAMP,请确保它正在运行。不要从托盘菜单退出WAMP,因为它将停止MySQL服务器。
#6
0
To connect to a new server, you click on home + add new connection. Put IP or webserver URL in new connection.
要连接到新服务器,请单击home +添加新连接。在新连接中放置IP或webserver URL。
#7
0
Just try to run the following command manually:
只需尝试手动运行以下命令:
C:\wamp\bin\mysql\mysql5.6.17\bin\mysqld.exe --console
It worked for me :)
它为我工作:
#8
0
Ran into the exact same problem as OP and found that leaving the "MySQL Server Port" empty in the MySQL Workbench connection solves the issue.
遇到与OP相同的问题,发现在MySQL Workbench连接中保持“MySQL服务器端口”为空解决了这个问题。