Example 1

If the server is started with --binlog-do-db=sales and you issue the following statements, the UPDATE statement is not logged:

mysql> USE prices;mysql> UPDATE sales.january SET amount=amount+1000;

The main reason for this just check the default database behavior is that it is difficult from the statement alone to know whether it should be replicated. It is also faster to check only the default database rather than all databases if there is no need.

Get MySQL 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.