O'Reilly logo

MySQL 8 Cookbook by Karthik Appigatla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Example 2

If the server is started with --binlog-do-db=sales, the following UPDATE statement is logged even though prices were not included when setting --binlog-do-db:

mysql> USE sales;mysql> UPDATE prices.discounts SET percentage = percentage + 10;

Because sales is the default database when the UPDATE statement is issued, the UPDATE is logged.

In row-based logging, it is restricted to database db_name. Only changes to tables belonging to db_name are logged; the default database has no effect on this.

Another important difference in --binlog-do-db handling for statement-based logging, as opposed to the row-based logging, occurs with regard to statements that refer to multiple databases. Suppose that the server is started with --binlog-do-db=db1 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required