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

Move to the next log

You can use the FLUSH LOGS command to close the current binary log and open a new one:

mysql> SHOW BINARY LOGS;+----------------+-----------+| Log_name       | File_size |+----------------+-----------+| server1.000001 |       154 |+----------------+-----------+1 row in set (0.00 sec)mysql> FLUSH LOGS;Query OK, 0 rows affected (0.02 sec)mysql> SHOW BINARY LOGS;+----------------+-----------+| Log_name       | File_size |+----------------+-----------+| server1.000001 |  198      || server1.000002 |  154      |+----------------+-----------+2 rows in set (0.00 sec)

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