Skip to content

Instantly share code, notes, and snippets.

@ffeast
Created December 30, 2015 06:41
Show Gist options
  • Save ffeast/800cd8c67e9be8a4c9cd to your computer and use it in GitHub Desktop.
Save ffeast/800cd8c67e9be8a4c9cd to your computer and use it in GitHub Desktop.
Mysql connection to domain socket over ssh
socat "UNIX-LISTEN:your_local_path/mysql.sock,reuseaddr,fork" \
EXEC:'ssh user@remote-host socat STDIO UNIX-CONNECT\:/your_server_path/mysql.sock"
mysql -S your_local_path/mysql.sock -u user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment