O'Reilly logo

Mastering MariaDB by Federico Razzoli

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

Maintenance of the server logs

All server logs require some maintenance. We will start with the FLUSH statements, which can be used occasionally, to ensure that the last information is written to the files. Then, we will discuss how to rotate both the file- and table-based logs to the free space available on the disk.

Flushing logs

After performing certain operations, or before performing a backup, you may want to flush the contents in the logs. Flushing a log means that its files are closed and reopened, and all the buffered information is written to the file during the process. For file-based logs, the FLUSH LOGS statement can be used. To flush all logs, simply run the following command:

FLUSH LOGS;

The following flavors are available to selectively ...

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