MySQL disable generating Log File mysql-bin.000001

Source: Internet
Author: User

MySQL disable generating Log File mysql-bin.000001

In a MySQL database, mysql-bin.000001, mysql-bin.20.02 files are database operation logs, such as UPDATE a table, or DELETE some data, even if the statement does not match the data, this command will also be stored in the log file, and the execution time of each statement will also be recorded.

However, these files are growing fast, especially occupying server resources. If the server resources are insufficient, you can delete these log files on a regular basis or modify the configuration file to prevent log generation.

1. Delete these logs

Directly remove files starting with a mysql-bin.000, including the mysql-bin.index.

2. modify the configuration file so that these logs are no longer generated

Edit the my. cnf file. Command: vi/etc/my. cnf

Comment out the log-bin = mysql-bin attribute.

In this way, the log files that occupy disk resources will no longer exist, but the historical operation records cannot be queried.

-------------------------------------- Split line --------------------------------------

Install MySQL in Ubuntu 14.04

MySQL authoritative guide (original book version 2nd) Clear Chinese scan PDF

Ubuntu 14.04 LTS install LNMP Nginx \ PHP5 (PHP-FPM) \ MySQL

Build a MySQL Master/Slave server in Ubuntu 14.04

Build a highly available distributed MySQL cluster using Ubuntu 12.04 LTS

Install MySQL5.6 and Python-MySQLdb in the source code of Ubuntu 12.04

MySQL-5.5.38 universal binary Installation

-------------------------------------- Split line --------------------------------------

This article permanently updates the link address:

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.