Skip to content

Instantly share code, notes, and snippets.

@chrismckinnel
Created November 27, 2012 15:53
Show Gist options
  • Save chrismckinnel/4155006 to your computer and use it in GitHub Desktop.
Save chrismckinnel/4155006 to your computer and use it in GitHub Desktop.
function _forward_mysql_via_ssh() {
CMD_START="ssh"
CMD_END=" -f $1 -L $2:$3:3306 -N"
CMD="$CMD_START $CMD_END"
eval $CMD
}
function forward-dashboard-dev-mysql() {
PORT=8806
_forward_mysql_via_ssh toolkit-apps-dev.tangentlabs.co.uk $PORT 192.168.125.23
echo "Forwarding using: $PORT"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment