Skip to content

Instantly share code, notes, and snippets.

@rubeniskov
Last active August 29, 2015 14:19
Show Gist options
  • Save rubeniskov/2723295d22c759abdb33 to your computer and use it in GitHub Desktop.
Save rubeniskov/2723295d22c759abdb33 to your computer and use it in GitHub Desktop.
command to create remote mysql dump by ssh and import to local
ssh [remote_username]@[remote_address] mysqldump -u[mysql_remote_user] -hlocalhost -p[mysql_remote_password] [mysql_remote_database] > /tmp/mydump && mysql -u[mysql_local_user] -p[mysql_local_password] [mysql_local_database] < /temp/mydump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment