Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

11
  • 2
    the best solution imo... I'm using a modified version of this script which allows passing the password as env variable. If someone needs this functionality: sprunge.us/fBDL?bash Commented Jul 31, 2014 at 14:14
  • 1
    imho best solution too : + mysqldump --extended-insert=FALSE -u "$mysql_user" -p"$mysql_user_pw" "$db" $t \ | gzip > "$tables_dump_dir/$t.sql.gz" a bit slower , but works on any data and any row data lengths ... Commented May 16, 2015 at 19:46
  • thx! I used your idea to generate a backup script that backups all databases: github.com/rubo77/mysql-backup.sh/blob/master/mysql-backup.sh Commented Nov 6, 2015 at 5:43
  • 13
    Unfortunately, this can't be done as a single transaction, so you don't necessarily get a series of files that can be re-loaded without any FK errors. Commented Nov 21, 2015 at 15:14
  • probably you want to add some more arguments like mysqldump --extended-insert=FALSE --order-by-primary --complete-insert Commented Aug 3, 2016 at 16:02