Remove Binlog from MySQL

Source: Internet
Author: User

Recently, using the latest version of MySQL, 8.0.11 found that the default value of MySQL's log_bin parameter changed to ON. At first, the change was not noticed, resulting in the use of a lot of bin logs, which consumed a lot of disk space.

So you need to delete these logs and free up disk space.

1. Use show master logs to view

Mysql> show master logs;
+---------------+--------------+
| Log_name | File_size |
+---------------+--------------+
| binlog.000001 | 222927706 |
| binlog.000002 | 11270499 |
| binlog.000003 | 682550567 |
| binlog.000004 | 5784673228 |
| binlog.000005 | 3832371427 |
| binlog.000006 | 66920730055 |
| binlog.000007 | 126988323278 |
| binlog.000008 | 74493309953 |
| binlog.000009 | 340865 |
| binlog.000010 | 155 |
+---------------+--------------+

2. Delete

Mysql> purge binary logs to ' binlog.000009 ';
Query OK, 0 rows affected (5.98 sec)

Remove Binlog from MySQL

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.