sqlyog通过跳板机ssh连接mysql数据库

方法一:

sqlyog通过跳板机ssh连接mysql数据库

sqlyog通过跳板机ssh连接mysql数据库

方法二:

在跳板机上启动sh脚本做ssh端口转发,客户端配置连接 10.0.0.1的8306端口即可

jdbc:mysql://10.0.0.1:8306/testdb?useUnicode=true&characterEncoding=UTF-8&generateSimpleParameterMetadata=true

服务器外网IP:1.1.1.1
内网IP:10.0.0.1


vim ssh_forward.sh

# ssh -NfL 1.1.1.1:8306:mysql_ip:3306 1.1.1.1
# ssh -NfL 10.0.0.1:8306::mysql_ip:3306 10.0.0.1


ssh -NfL 1.1.1.1:8306:10.1.1.1:3306 1.1.1.1
ssh -NfL 10.0.0.1:8306::10.1.1.1:3306 10.0.0.1

相关文章:

  • 2021-07-08
  • 2021-12-04
  • 2021-11-17
  • 2022-12-23
  • 2021-06-29
  • 2021-06-04
  • 2021-06-22
  • 2022-01-06
猜你喜欢
  • 2021-12-29
  • 2021-07-08
  • 2022-12-23
  • 2021-09-15
  • 2022-01-08
相关资源
相似解决方案