Skip to content

Instantly share code, notes, and snippets.

@ivanrosolen
Last active April 19, 2019 15:42
Show Gist options
  • Save ivanrosolen/3a74ed9575848cf3b69c34930e3821bb to your computer and use it in GitHub Desktop.
Save ivanrosolen/3a74ed9575848cf3b69c34930e3821bb to your computer and use it in GitHub Desktop.
Dump a specific table or few rows (MySQL)
mysqldump -h host_ip -u user -ppassword database_name > database_dump.sql
mysqldump -h host_ip -u user -ppassword database_name table_name > table_dump.sql
mysqldump -h host_ip -u user -ppassword database_name table_name --where="date_created='2019-04-19'" > rows_dump.sql
Big table, use nohup command &
If user is not root, you may add --lock-tables=false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment