如何通过两个SSH主机连接到MySQL数据库
这是我的情况。 有两个SSH主机,如下所示: MySQL在BOX2主机上运行。
mybox(MySQLGUIclient(-----ssh ) port22 )----box1) IP:190.xx.xx )---ssh ) port22 )--box2) ii
我的问题是,如果有多个SSH主机用于隧道连接,该如何连接?
解决方法:
我觉得这个很有用。 请从MyBox试试这个命令。 有MySQL客户端。
sh user @ box1- lsome-local-port : box 2:22
尝试通过客户端这样连接
MySQL host : localhost
mysqlusernmae : MySQL-username-of-server-installed-at-box 2
MySQL password 3360 MySQL-password-of-server-installed-at-box 2
MySQL port 33603306 (supposemysqlserveratbox-2 islisteningatport 3306 )。
在隧道信息中
SSH host : localhost
sh pass : ssh-password-of-box 2
SSH port : some-local-port
标签: mysql,ssh
资料来源: https://codeday.me/bug/2019 05 30/1183812.html