It is recommended to close the MySQL log, otherwise the 40G hard disk of the ordinary server will not be enough

Lao Yang five hundred and thirty-two zero

When the big data of the website is tens of thousands or hundreds of thousands or millions, when you need to update the data of the whole site in batches, the mysql log occupies all your 40G hard disks. I have personally experienced that when you update 300W data in batches, the log is deleted several times in dozens of gigabytes, and there is no specific statistics about the number of log files produced, And the performance of the database will be seriously affected as the log increases.

How to close MYSQL logs? On the Linux server/etc/my.cnf

Find these two lines and comment them#

#log-bin=mysql-bin

#binlog_format=mixed

And find the deletion in the MySQL database directory mysql-bin.*** Finally, restart the MySQL service for all temporary files.

 1. It is recommended to close the MySQL log, otherwise the 40G hard disk of the common server will not be enough - Laoyang plug-in

It is more convenient to use the pagoda server. In the database software management log setting, you can directly close the binary log and clear the temporary log file.

 2. It is recommended to close the MySQL log, otherwise the 40G hard disk of the common server will not be enough - Laoyang plug-in

Export Document
Reward the author
"It is recommended to turn off MySQL logs, otherwise the 40G hard disk of an ordinary server will be insufficient". doc
Download and save this article for collection and printing
Export Document