Solving the problem of "mysql-bin.000001" occupying oversized space

Source: Internet
Author: User

Description: mysql-bin.000001, mysql-bin.000002 files, such as the database operation log, such as update a table, or delete some data, even if the statement does not have matching data, the command will be stored in the log file, also includes the time of execution of each statement, also recorded in. This is primarily for operational review and multi-database synchronization. Ib_logfile is used to record the consistency of the InnoDB table, only after the machine can play a role.

Workaround:

No master-slave database, no review operation, these files are completely useless! Therefore, first clean up these files. Then edit the MySQL configuration file, organize it to record these logs again, shovel grass root. The Gentoo MySQL log is in/etc/mysql/my.cnf. Comment out the log-bin in the line.

Then restart the MySQL server.

Solving the problem of "mysql-bin.000001" occupying oversized space

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.