目录

通过xshell-建立ssh隧道连接数据库

目录

通过xshell 建立ssh隧道连接数据库

网络状况

https://i-blog.csdnimg.cn/blog_migrate/27248ed56c956848517359ac59739faa.png

一、本机xshell 建立隧道

1、先测试server1 上能Telnet通 server2的23400端口

https://i-blog.csdnimg.cn/blog_migrate/26cd40704761e1744310e6d9c4c22cd2.png

2、xhell 新建连接

https://i-blog.csdnimg.cn/blog_migrate/66d61e3974a0328b325b5f56adccb556.png

https://i-blog.csdnimg.cn/blog_migrate/6e8a944b599fc2771eebb6589a6d3f70.png

3、xshell 打开链接。

https://i-blog.csdnimg.cn/blog_migrate/aca0494ddab9231bfaaa2fc3ca2fc463.png

二、用数据库连接工具连接数据库;

1、确认端口打开

telenet 127.0.0.1 2121

2、数据库连接工具连接端口(这里用squirrel 连接esgyn数据库)。

https://i-blog.csdnimg.cn/blog_migrate/6549c8344e25192d1084614731e8bbf9.png