zoukankan      html  css  js  c++  java
  • 清理mysql binlog日志

    1.查看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 |
    +------------------+------------+
    复制代码

    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日志

    重启mysql

    service mysqld restart
  • 相关阅读:
    springMVC接收前端参数的方式
    使用jQuery进行图片分页,每页形成九宫格
    bootstrapTable行样式设置
    BLUEKING----蓝鲸
    Golden Gate 特点及用途
    Linux 如何解决 xhost: unable to open display ""
    LINUX 磁盘如何分区
    ses_cations 值顺序
    简单了解undo
    演示行级排他锁
  • 原文地址:https://www.cnblogs.com/chenjw-note/p/10318151.html
Copyright © 2011-2022 走看看