MySQL Forums
Forum List  »  Install & Repo

Re: Watching schema changes
Posted by: Peter Brawley
Date: December 04, 2018 04:59PM

MySQL logs DDL stmts to https://dev.mysql.com/doc/refman/8.0/en/ddl-log.html but (i) it's not human-readable and (ii) deletes it on every server restart.

From https://dba.stackexchange.com/questions/91185/how-to-track-only-ddl-statements-executed-in-mysql ...

If you are using MySQL 5.6 and should you decide to bite the bullet and use mysqlbinlog and parse the output, you may need to setup mysqlbinlog on an external server, redirecting output to your own log file for DDLs. You will also have to use stop-never. here is what the MySQL Documentation says on stop-never:

This option is used with --read-from-remote-server. It tells mysqlbinlog to remain connected to the server. Otherwise mysqlbinlog exits when the last log file has been transferred from the server. stop-never implies --to-last-log, so only the first log file to transfer need be named on the command line.

--stop-never is commonly used with --raw to make a live binary log backup, but also can be used without --raw to maintain a continuous text display of log events as the server generates them.

This option was added in MySQL 5.6.0.

Options: ReplyQuote


Subject
Written By
Posted
December 04, 2018 03:07PM
Re: Watching schema changes
December 04, 2018 04:59PM
December 06, 2018 05:46PM
December 09, 2018 10:29PM
December 10, 2018 12:15PM
December 10, 2018 02:16PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.