MySQL log file cleanup and shutdown

Source: Internet
Author: User

Today on the server DF on the next, a look, the Var directory has 98%, emptied some log files and backup files found under the MySQL there are a lot of similar mysql-bin.000001 files, Google a bit to say is the log, there is no use to kill it
Operation Log of database

mysql-bin.000001
mysql-bin.000002
mysql-bin.000003

Wait, a lot of log files are more than 10 g. My MySQL total database adds up to less than 1G
These can be cleaned out.

Enter Mysql-u root-p and enter the password

Enter reset master after successful entry;

mysql> Reset Master;
Query OK, 0 rows affected, 1 warning (0.20 sec)

You can empty the MySQL log, the world is refreshing ...

If you don't want the MySQL log to be closed in My.ini

Find My.ini, open it, find Log-bin=mysql-bin, and then comment it out.

#log-bin=mysql-bin

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.