bindiego
5/11/2016 - 3:12 PM

SSH tunnel MySQL

SSH tunnel MySQL

#!/bin/bash

ssh -fNg -L 3307:127.0.0.1:3306 myuser@remotehost.com
mysql -h 127.0.0.1 -P 3307 -u dbuser -p db