Created
December 30, 2015 06:41
-
-
Save ffeast/800cd8c67e9be8a4c9cd to your computer and use it in GitHub Desktop.
Mysql connection to domain socket over ssh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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