MyTetra Share
Делитесь знаниями!
How to Connect to MySQL via SSH Tunnel in Linux
Время создания: 15.03.2017 08:39
Текстовые метки: linux ssh tunnel mysql
Раздел: Linux
Запись: Velonski/mytetra-database/master/base/148954915684aj9y0oc3/text.html на

Open terminal window to connect to MySQL server with MySQL Query Browser via SSH tunnel.

If you want to connect to server from "outside", not from Plone, you have to build SSH tunnel to connect.

  1. Build SSH tunnel by running the following command in the terminal window:
  2. ssh login@server -L 3306: -N

    where login and server (something like are your SSH connection details that can be found at your quintagroup account (

  3. You will get response asking you to enter your SSH password (can also be found at your quintagroup account)
  4. login@server's password:
  5. Now when the tunnel is built stop the previous command and set it into background to be able to initiate other commands.
    • press Ctrl+Z to stop the command and you should get response:
    • [1]+ Stopped        ssh login@server -L 3306: -N
    • to set it in background, type bg and you should get response:
    [1]+ ssh login@server -L 3306: -N &
  6. Connect to MySQL server as if it is running on your local system (localhost:3306) for example by running the following command in the terminal window:
  7. mysql -h -p -u user database

    where user and database - are username and database name that can be found among MySQL access details at

  8. You will be asked to provide the password for your database that can also be found among MySQL access details at
  9. That's it! You are in.
  10. After you are finished close application you've used to access MySQL server (for command line tool mentioned in step 4 type Ctrl+D to leave).
  11. Then return to your SSH tunnel:
  • get it into foreground: press fg and you will get the response:  
  • ssh login@server -L 3306: -N
  • press Ctrl+C to stop it.
Так же в этом разделе:
MyTetra Share v.0.58
Яндекс индекс цитирования