How can I run a MySQL client through an SSH tunnel to a VPS in a single script? [closed] (stackoverflow.com)stack
22 points by hoi in stackoverflow.com · 3h ago · stack
I need to connect to a MySQL database on a remote Ubuntu VPS that only accepts local connections (bind-address 127.0.0.1). I want to open an SSH tunnel and run a query against the database from my local machine in one step, so I can automate backups. This is what I have tried so…