云自無心水自閑

          天平山上白云泉,云自無心水自閑。何必奔沖山下去,更添波浪向人間!
          posts - 288, comments - 524, trackbacks - 0, articles - 6
            BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

          Mysql replication error 1201

          Posted on 2012-11-18 20:23 云自無心水自閑 閱讀(617) 評論(0)  編輯  收藏
          Mysql replication error 1201
          On a fine happy morning I am greeted with an alert that slave is not running. Running start slave yields this:
          ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in the MySQL error log
          Enabling the log yielded nothing. Googling yielded This Page that helped me a lot, but I didn't have to do quite as much work all over again. Here is what I did.
          First, I saved my "SHOW SLAVE STATUS\G" output:
          ************************** 1. row **************************
                       Slave_IO_State:
                          Master_Host: 127.0.0.1
                          Master_User: replication
                          Master_Port: 3307
                        Connect_Retry: 60
                      Master_Log_File: mysqld-bin.000401
                  Read_Master_Log_Pos: 98
                       Relay_Log_File: mysqld-relay-bin.006135
                        Relay_Log_Pos: 242
                Relay_Master_Log_File: mysqld-bin.000401
                     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:
                           Last_Errno: 0
                           Last_Error:
                         Skip_Counter: 0
                  Exec_Master_Log_Pos: 98
                      Relay_Log_Space: 0
                      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
          1 row in set (0.00 sec)
          STOP SLAVE; RESET SLAVE;
          mysql> CHANGE MASTER TO MASTER_LOG_POS=98 , MASTER_LOG_FILE = 'mysqld-bin.000401';
          Query OK, 0 rows affected (0.04 sec)
          mysql> start slave;
          Query OK, 0 rows affected (0.00 sec)
              
          The position comes from the output I saved before
          It's working fine again. Still don't know what caused this - possibly random remote server power cycling...



          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 濮阳市| 开封市| 诏安县| 伊宁市| 和静县| 耒阳市| 新营市| 资阳市| 云梦县| 南和县| 东港市| 钟祥市| 科技| 乐山市| 小金县| 沾化县| 平顶山市| 浦城县| 崇明县| 商都县| 烟台市| 久治县| 榆林市| 治县。| 广灵县| 河源市| 青州市| 华宁县| 太仆寺旗| 黔江区| 延川县| 井冈山市| 梁河县| 逊克县| 资溪县| 铜山县| 嘉兴市| 博爱县| 木兰县| 二连浩特市| 富民县|