Mysql清理binlog日志

1.查看binlog日志

创新互联专注为客户提供全方位的互联网综合服务,包含不限于网站制作、做网站、宏伟网络推广、成都小程序开发、宏伟网络营销、宏伟企业策划、宏伟品牌公关、搜索引擎seo、人物专访、企业宣传片、企业代运营等,从售前售中售后,我们都将竭诚为您服务,您的肯定,是我们大的嘉奖;创新互联为所有大学生创业者提供宏伟建站搭建服务,24小时服务热线:18980820575,官方网址:www.cdcxhl.com
mysql>show binary logs;+------------------+------------+| Log_name         | File_size  |+------------------+------------+| mysql-bin.000061 |      50624 || mysql-bin.000062 |       5159 || mysql-bin.000063 |        126 || mysql-bin.000064 |       3067 || mysql-bin.000065 |        503 || mysql-bin.000066 |        494 || mysql-bin.000067 |        107 || mysql-bin.000068 |       1433 || mysql-bin.000069 |       7077 || mysql-bin.000070 |        107 || mysql-bin.000071 |        804 || mysql-bin.000072 |       7642 || mysql-bin.000073 |       2198 || mysql-bin.000074 |     350139 || mysql-bin.000075 |        126 || mysql-bin.000076 |      51122 || mysql-bin.000077 | 1074279197 || mysql-bin.000078 | 1074435879 || mysql-bin.000079 |  928917122 |+------------------+------------+

2.删除某个日志文件之前的所有日志文件

mysql>purge binary logs to 'mysql-bin.000079';  mysql>show binary logs;+------------------+-----------+| Log_name         | File_size |+------------------+-----------+| mysql-bin.000079 | 928917122 |+------------------+-----------+mysql>reset master;   #重置所有的日志

3.关闭mysql的binlog日志

#log-bin=mysql-bin  在my.cnf里面注释掉binlog日志重启mysqlservice mysqld restart

当前名称:Mysql清理binlog日志
文章地址:http://hbruida.cn/article/djejj.html