Home  >  Article  >  Database  >  How to delete mysql error log?

How to delete mysql error log?

青灯夜游
青灯夜游Original
2020-10-07 13:07:113993browse

How to delete the mysql error log: First use the "mysqladmin -uroot -p flush-logs" command to open a new error log, and the old error log will automatically be renamed "filename.err-old"; Then delete these ".err-old" files.

How to delete mysql error log?

The Error Log is the most commonly used log in MySQL. It mainly records information during the startup and stop process of the MySQL server, and the running process of the server. malfunctions and abnormal situations that occur during the operation.

Delete error log

In MySQL, you can use the mysqladmin command to open a new error log to ensure hard disk space on the MySQL server. The syntax of the mysqladmin command is as follows:

mysqladmin -uroot -p flush-logs

After executing this command, the MySQL server will first automatically create a new error log, and then rename the old error log to filename.err-old.

When an exception occurs on the MySQL server, the administrator can find the time and cause of the exception in the error log, and then solve the exception based on this information. For error logs from a long time ago, it is unlikely to be viewed, and these error logs can be deleted directly.

Recommended tutorial: mysql video tutorial

The above is the detailed content of How to delete mysql error log?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn