I'm trying to connect to a remote MySQL server via ssh so that I have write-access to export some data. At the moment I can do the following:
- Connect to the remote MySQL using
mysql -u mysqluser -pPASSWORD -h HOSTIP DATABASENAME
- Connect to the machine using
(Note that HOSTIP is the same for ssh and mysql server, but mysqluser and sshuser are different).
However, I cannot connect to remote MySQL via ssh. I tried two things:
- After ssh-ing into the machine, I tried
mysqlin the terminal but it is not installed.
- I tried
ssh -L 1234:mysqlhost:3306 sshuser@sshhost. However, I can only enter my
sshpassword, after which I get ssh-ed in but no connection to MySQL still.