How to connect to remote MySQL with SSH tunnel from Windows PC
In my previous post
How to make root authorisation by Private Key in Ubuntu 17.0 I described, how to connect to Linux server with private key.
In this post I'll describe, how to connect to MySQL with SSH tunnel.
For this, you should have Cygwin installed on your PC. In the post
How to make root authorisation by Private Key in Ubuntu 17.0 I recommended to convert private
id_rsa key to *.ppk with WinSCP. But in this case, we need original
id_rsa key.
Make *.bat file with script
c:\cygwin64\bin\ssh -i c:/Art/Apps/id_rsa -L 3306:127.0.0.1:3306 [email protected]
Where
c:/Art/Apps/id_rsa is your private key,
root is your username to connect with SSH.