![]()
Other names may be trademarks of their respective Oracle is a registered trademark of Oracle Corporation and/or itsĪffiliates. You can use the command below $ mysql -u root -p -port 3306 -h 127.0.0.1 for example : $ ssh -R 3306:192.168.1.1:3306 $ ssh -R 3306:192.168.1.1:3306 -NnTĪfter successfully creating the tunnel, using another window or tab on your terminal app you can test connecting to MySQL on the remote server. To create an SSH Tunnel to a server behind (the one that is accessible from your computer) you only need to change -L option to -R and also change 127.0.0.1 to the remote MySQL server IP Address or hostname. You only need to add -NnT options behind the command above. T will disable the pseudo-terminal allocation. N wich will disable the ability to execute a remote command. If you only want to create a tunnel you can use -NnT option. The command above will open a pseudo terminal. You can use both localhost or 127.0.0.1 interchangably. In the sample above we create SSH tunnel from local port 3306 on our computer to port 3306 on. To create a tunnel use the following command: $ ssh -L 3306:127.0.0.1:3306 password: If successful the confirmation message is displayed.Ĭreating SSH Tunnel From Linux or MacOS X #Mysql could not start ssh tunnel manager ubuntu passwordOpen MySQL Workbench and enter the hostname as 127.0.0.1 and port 3306 (unless different above).Įnter your password for MySql on the remote machine. After you're successfully connected do not close the PuTTY window because it has the SSH Tunnel to the remote server. You will need to enter username and password. It will start SSH connection to remote server. If your mysql server uses another port, ammend as such. On the Category page, choose Connection -> SSH -> Tunnels.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |