通过SSH Tunnel连接远程数据库

原理很简单:利用SSH Tunnel做个映射。

ssh -L 3307:localhost:3306 one@dbserver

然后用 mysql 连接本地的 3307 端口即可。

参考文章:http://www.whoopis.com/howtos/mysql_ssh_howto.html

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>