SSH tunneling using PuTTY and MySQL-Front(PuTTY和MySQL-Front SSH隧道访问)

SSH tunneling using PuTTY and MySQL-Front

PuTTY setup

  1. Create session
    • hostname: any pgrad or ugrad SIT server e.g. grey.ug.it.usyd.edu.au or simply mysql.it.usyd.edu.au
    • NOTE - as mysql.it.usyd.edu.au is a pgrad server, ugrads should use a ugrad server in the hostname field otherwise nothing will work ;-)
    • protocol:SSH
    • Session name: mysql (e.g.)
  2. Connection->SSH->Tunnels
    • Source Port: 13306 (本地端口:指定一个没有被占用的端口)
    • Destination: mysql.it.usyd.edu.au:3306(远程机器上myql数据库所在服务器ip地址和端口,端口一般是3306)
  3. Remember to click the “Add” Button to add the forwarded port settings as given above.
  4. Click on Session again and save the “mysql” session
  5. SSH tunneling using PuTTY and MySQL-Front(PuTTY和MySQL-Front SSH隧道访问)_第1张图片
  6. SSH tunneling using PuTTY and MySQL-Front(PuTTY和MySQL-Front SSH隧道访问)_第2张图片

MySQL-Front Setup setup

  1. Install
  2. Click the Connection Button under the File Menu
  3. Hostname/IP should be localhost
  4. Enter the correct username, password
  5. The port is 13306 instead of the default 3306 shown
  6. Enter your database name
  7. Click save

Making a connection

  1. Start PuTTY and connect with the "mysql" session using your normal login and password - congratulations, you now have an encrypted tunnel(启动PuTTY,登陆中转机,注意登陆后不要关闭了)
  2. Start MySQL-Front and click the connection button under the File Menu(启动MySQL-Front 登陆,有个缺点貌似容易断)
  3. Click connect and you should be connected
Notes:
  1. If you get a connection failed error message from MySQL-Front, recheck the settings in MySQL-Front
  2. If PuTTY cannot connect - recheck your settings and make sure there is no local firewall blocking SSH
  3. 整个过程通过跳板机,把本地设定的端口(localhost:13306)映射到远程机器的mysql数据库的3306端口,全程保持PuTTY连接不断开,本地mysql客户端工具连接localhost:13306实现对远程数据库的访问
PuTTY and MySQL-Front are free and can be obtained here:

http://www.mysqlfront.de/

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Support



转自:http://sydney.edu.au/engineering/it/~support/w/moin.cgi/MYSQL_2dSSH

你可能感兴趣的:(SSH tunneling using PuTTY and MySQL-Front(PuTTY和MySQL-Front SSH隧道访问))