Linux Toad 未连接到 mysql 远程服务器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6669583/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-05 05:04:23  来源:igfitidea点击:

Toad not connecting to mysql remote server

mysqlwindowslinuxsshtoad

提问by K.P.

I am using Toad on my windows machine to connect to mysql on the remote ubuntu linux server. And it is not connecting it. It says "Can't connect to SSH server on '': No connection could be made because the target machine actively refused it 22." I guess 22 is the ssh port and I provided the default mysql db server port i.e. 3306. I don't know what's happening

我在我的 Windows 机器上使用 Toad 连接到远程 ubuntu linux 服务器上的 mysql。它没有连接它。它说“无法连接到 '' 上的 SSH 服务器:无法建立连接,因为目标机器主动拒绝它 22。” 我猜 22 是 ssh 端口,我提供了默认的 mysql db 服务器端口,即 3306。我不知道发生了什么

回答by K.P.

After 20 hrs of trying, finally got the solution for this. First added the port 3306 and ip of my db server to the firewall settings of my antivirus. Then edited the /etc/mysql/my.cnf file and then added remote user in the database's user table. The link below explains a lot what I did.

经过20小时的尝试,终于得到了解决方案。首先将我的数据库服务器的端口 3306 和 ip 添加到我的防病毒软件的防火墙设置中。然后编辑 /etc/mysql/my.cnf 文件,然后在数据库的用户表中添加远程用户。下面的链接解释了我所做的很多事情。

http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html

http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html

It helped me. Although the settings at my server is different from this. This might help you all.

它帮助了我。虽然我服务器上的设置与此不同。这可能对大家有所帮助。

回答by Redouane Tkwine

Set connection properties as follows:

设置连接属性如下:

enter image description here

在此处输入图片说明

Don't forget to check "Use MySQL libraries"

不要忘记检查“使用 MySQL 库”

Tested on my environment:

在我的环境中测试:

  • Ubuntu server 14:04 (@ ip 10.0.0.4)
  • openssh server is installed
  • Port 3306 is open (netstat -ntlp | grep LISTEN)
  • MySql 5.5
  • Client: Windows 7, 64 bit
  • TOAD 7.7
  • Ubuntu 服务器 14:04 (@ ip 10.0.0.4)
  • 安装了openssh服务器
  • 端口 3306 已打开 ( netstat -ntlp | grep LISTEN)
  • mysql 5.5
  • 客户端:Windows 7,64 位
  • 蟾蜍 7.7