I have a server setup as follows:
webserver (gateway accessible from the Internet via SSH)dbserver (database server not accessible from the Internet)
My goal is to use mysqldump to pull the backup from dbserver to my laptop over the internet. Up to this point, the question is a duplicate of this question , except that webserver not installed mysqldump , and I do not have permission to install it. Therefore, I am trying to use mysqldump on my laptop to pull it from the server behind a gateway for which I do not have SSH privileges.
After discussing here and here , I'm trying to do something like this to set up a tunnel:
ssh -f -L 3306:dbserver:3306 user@webserver -N
and then:
mysqldump -P 3306 -h localhost -u dbuser -p db
but this man I faced the same problem, and I'm not quite sure what is going on with the tunneling or how to fix it (and adding an entry to my laptop hosts file does not seem to fix it, as it was for him).
source share