mysqldump --single-transaction -u user -p[user_password] [database_name] | gzip > dumpfilename.sql.gz
the next thing you’re gonna ask …
scp username@hostname:/path/to/file/from/root/dumpfilename.sql.gz ./dumpfilename.sql.gz
and after that …
sed -i 's/DEFINER=[^*]*\*/\*/g' mydump.sql
and if you can’t create InnoDB tables and the create statements contain ROW_FORMAT
sed -ie 's/ROW_FORMAT=FIXED//g'