通常使用Squel Pro或MySQL Bench连接到远程mysql服务器,没有问题。
但现在我得到错误,我不明白为什么。
Failed to Connect to MySQL at localhost:3306 through SSH tunnel at root@mimachine:24 with user root Lost connection to MySQL server at 'reading initial communication packet', system error: 0
好。
在/var/log/mysql/error.log关于尝试访问的任何错误
也尝试与非特权用户。
还要添加几个root的实例..
MariaDB [(none)]> SELECT User, Host FROM mysql.user; +------------------+--------------+ | User | Host | +------------------+--------------+ | root | 127.0.0.1 | | root | 172.31.20.34 | | root | 192.168.1.1 | | c1userdb | localhost | | debian-sys-maint | localhost | | ispconfig | localhost | | root | localhost | +------------------+--------------+ 7 rows in set (0.00 sec)
尝试修改sshd_config AllowTcpForwarding
20:28:43 [ERR][ SqlEditor]: Your connection attempt failed for user 'root' from your host to server at 127.0.0.1:3306: Tunnel error: Could not open port forwarding SSH channel: (1, 'Administratively prohibited')