Working remotely with mysql from local centos
Solution 1:
Couple of ways I've done this in the past
- scp "your script" to the remote server then run it over ssh
ssh remote server 'bash -c "./path/to/script"'
- Port forward the remote hosts mysql port of 3306 to your local host 3333
ssh -L 3333:remote_server_name_or_ip:3306
Then, run your script with sql queries and have it point to your localhost:3333