1、使用ssh forward,将远程服务器的3306端口转发到本机
ssh -nNT -L 3306:localhost:3306 user@remote_db_server
注意,不要关闭本机的terminal
2、检查是否成功:
linux下,执行命令:netstat -antp|grep 3306
mac下,执行命令:lsof -n -i:3306 | grep LISTEN
上一篇:PostgreSQL构建流复制拉取日志的起始位置在哪里
下一篇:SQL Server stuff函数的用法