views:

62

answers:

1

When i try to get a dump of a mysql database, the dump stops when a row in it is updated. How can i prevent that? I already tried following options with no result:

  • -f (forces continu even when error)
  • -x (lock all tables)

when i log any error, i get nothing

Command i'm using:

mysqldump --user=* --password=* --all-databases --log-error=*.log | gzip > *.gz

A: 

By default it will lock all tables; this stops anything being updated.

If you are using transactional engines exclusively (InnoDB) then you probably want to use --lock-tables=0 and --single-transaction

This will use a MVCC snapshot (effectively).

Please post exactly what error you're getting, as well as the command you're using.

MarkR
I edited my post with the command i'm using. I'm not getting any error. the file is too small and corrupt. sometimes the backup does work with the same command
MichaelD