Home > Database > Mysql Tutorial > body text

3 ways to clear binlog in MySQL!

黄舟
Release: 2017-02-18 11:08:19
Original
2507 people have browsed it


-- mysql delete log online

1 mysql command purge

mysql> purge master logs to "mysql-bin.000410";
Query OK, 0 rows affected (3.71 sec)
Copy after login

2 Manual rm cleanup

rm -rf mysql-bin.00040*;
vim mysql-bin.log.index
Copy after login

Purge Remove the mysql-bin.0004** record inside

3 Parameter cleanup

set global expire_logs_days=5;
Copy after login

System automatic cleanup

The above are 3 in MySQL How to clear binlog! Contents, please pay attention to the PHP Chinese website (www.php.cn) for more related content!


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!