kymbrik
3/7/2018 - 11:53 AM

MySQL connection over SSH tunnel - how to specify other MySQL server?

Solved it! The thing was to connect to the correct server when creating the tunnel itself - should've seen that one coming.

ssh -f user@ssh.example.com -L 3307:mysql1.example.com:3306 -N

mysql -h 127.0.0.1 -P 3307