Go to the first, previous, next, last section, table of contents.


The Update log

When started with the --log-update=file_name switch mysqld makes a log file with all SQL command that update data. It results in a file with name of file_name.# where # is a number that is increased for each refresh. If you do not give a file name the current hostname is used.

The logging is smart since it only writes statements that really update data. So an UPDATE or a DELETE with a WHERE that finds no rows is not written to the log. It even skips UPDATEs that updates a column to the value it had before.

If you want to update a database according from a update log you could do the following:

cat file-name.* | mysql


Go to the first, previous, next, last section, table of contents.