大家好,我是考100分的小小码 ,祝大家学习进步,加薪顺利呀。今天说一说mysql 清理binlog_mysql删除binlog,希望您对编程的造诣更进一步.
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 | +------------------+------------+
代码100分
2.删除某个日志文件之前的所有日志文件
代码100分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日志
代码100分#log-bin=mysql-bin 在my.cnf里面注释掉binlog日志 重启mysql service mysqld restart
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
转载请注明出处: https://daima100.com/10166.html