如何访问远程MySQL服务器?

我试图从我自己的电脑访问我的远程MySQL服务器。

我没有注意到:

bind-address = 80.10.65.45 

我添加了80.10.65.45作为特权的服务器

 root 80.10.65.45 yes ALL PRIVILEGES yes 

我在MacosX上使用Sequel Pro通过SSH进行连接

这里是debugging日志:

 debug1: Authentication succeeded (password). debug1: Local connections to LOCALHOST:58517 forwarded to remote address 127.0.0.1:3306 debug1: Local forwarding listening on ::1 port 58517. debug1: channel 0: new [port listener] debug1: Local forwarding listening on 127.0.0.1 port 58517. debug1: channel 1: new [port listener] debug1: Entering interactive session. debug1: Connection to port 58517 forwarding to 127.0.0.1 port 3306 requested. debug1: channel 2: new [direct-tcpip] channel 2: open failed: connect failed: Connection refused debug1: channel 2: free: direct-tcpip: listening port 58517 for 127.0.0.1 port 3306, connect from 127.0.0.1 port 58519, nchannels 3 

我怀疑问题是服务器正在监听80.10.65.45,但是因为你有SSH隧道到服务器,它将尝试连接到服务器上的127.0.0.1这是不是正在侦听。 如果将其更改为bind-address = 0.0.0.0,它将侦听所有接口,这应该修复它。