Clear the bin.00000mysql log file in MySQL

Source: Internet
Author: User
Today on the server df next, a look, var directory has been 98%, clear some log files and backup files found that mysql below a lot of similar mysql-bin.000001

Today on the server df next, a look, var directory has been 98%, clear some log files and backup files found that mysql below a lot of similar mysql-bin.000001

Today on the server df next, a look, var directory has been 98%, clear some log files and backup files found that mysql below a lot of files similar to mysql-bin.000001, if Google says it's a log, it's useless.

Database operation logs

Mysql-bin.000001

Mysql-bin.000002

Mysql-bin.000003

A lot of log files are over 10 Gb. My total mysql database is less than 1 GB.

These can be cleared.

Enter mysql-u root-p and then Password

Enter reset master after successful entry; remember this; ah!

Mysql> reset master;

Query OK, 0 rows affected, 1 warning (0.20 sec)

Mysql logs can be cleared, and the world is refreshing...

If you do not want mysql to record logs, disable them in my. ini.

Find my. ini, open it, find log-bin = mysql-bin, and comment it out.

# Log-bin = mysql-bin

,

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.