是否有办法从绑定到localhost的远程服务器转储数据库?我唯一的想法是使用ssh隧道来端口转发3306。
任何想法都会很感激。由于
我试过:
mysqldump -u<username> -p<password> -h <remote machine> <table> > dump.dmp
I get back:
mysqldump: Got error: 2003: Can't connect to MySQL server on '<remote machine>:3306' (111) when trying to connect
试试这个:
ssh user@remote_host "mysqldump -u Usue -p'pass' DB | gzip -9" > localPath/dblocal.sql.gz