Created
December 15, 2021 08:52
-
-
Save mthri/2fe72728d6e8d85bd9d2ed48c4067768 to your computer and use it in GitHub Desktop.
Create an SSH Tunnel on Linux and Connect to MySQL
This file contains hidden or 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
ssh -p 22 -N -L 3306:127.0.0.1:3306 [USER]@[SERVER-IP] | |
# -p -> ssh port | |
mysql -u [MYSQL-USER] -p -h 127.0.0.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment