zoukankan      html  css  js  c++  java
  • 【故障处理】mysql出现大量slave bin日志,将磁盘空间占满

    master服务器IO线程 NO 
    问题描述:造成大量slave bin 日志 大量占用磁盘
    排查解决步骤:
    1.检查是配置的问题还是mysql数据库本身的故障
    2.将master的机器 mysql_slave配置同步为backup机器的mysql_master配置
    命令如下
        (1)在backup机器查询backup数据库master的配置  show master status;---【show master status;=mysql-bin.001160  Position=719834926】
        (2)在master机器查询配置信息是否一致 > show slave statusG;
    *************************** 1. row ***************************
                 Slave_IO_State: 
                    Master_Host: 192.168.3.251
                    Master_User: jianfei
                    Master_Port: 3306
                  Connect_Retry: 60
                Master_Log_File: mysql-bin.001159
            Read_Master_Log_Pos: 867363641
                 Relay_Log_File: slave-relay-bin.006727
                  Relay_Log_Pos: 4
          Relay_Master_Log_File: mysql-bin.001159
               Slave_IO_Running: No
              Slave_SQL_Running: No
                Replicate_Do_DB: 
            Replicate_Ignore_DB: 
             Replicate_Do_Table: 
         Replicate_Ignore_Table: 
        Replicate_Wild_Do_Table: 
    Replicate_Wild_Ignore_Table: mysql.%,information_schema.%,test.%
                     Last_Errno: 0
                     Last_Error: 
                   Skip_Counter: 1
            Exec_Master_Log_Pos: 1073741772
                Relay_Log_Space: 135085197862
                Until_Condition: None
                 Until_Log_File: 
                  Until_Log_Pos: 0
             Master_SSL_Allowed: No
             Master_SSL_CA_File: 
             Master_SSL_CA_Path: 
                Master_SSL_Cert: 
              Master_SSL_Cipher: 
                 Master_SSL_Key: 
          Seconds_Behind_Master: NULL
     
        注意:这是这次解决的命令
                slave stop;
                change master to master_log_file='mysql-bin.001160',master_log_pos=719834926;
                slave start;
                 完美解决

     

  • 相关阅读:
    23种设计模式之责任链模式
    23种设计模式之中介者模式
    23种设计模式之代理模式
    23种设计模式之原型模式
    23种设计模式之模板方法模式
    23种设计模式之建造者模式
    23中设计模式之抽象工厂模式
    批处理产生001到999之间的数字
    批处理随机显示星期几
    批处理简易密码登录
  • 原文地址:https://www.cnblogs.com/wudonghang/p/1ec243685e05294464d9ac6e6d4ac63e.html
Copyright © 2011-2022 走看看