如何清除MySQL複製

feelpurple發表於2017-07-31
1. Slave上的操作
mysql> show slave status\G
*************************** 1. row ***************************
               Slave_IO_State:
                  Master_Host: 192.168.56.100
                  Master_User: repliform
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mysqld-bin.000001
          Read_Master_Log_Pos: 1458
               Relay_Log_File: localhost-relay-bin.000003
                Relay_Log_Pos: 4
        Relay_Master_Log_File: mysqld-bin.000001
             Slave_IO_Running: No
            Slave_SQL_Running: Yes

mysql> stop slave;
Query OK, 0 rows affected (0.01 sec)

清除複製設定
mysql> reset slave all;
Query OK, 0 rows affected (0.07 sec)

mysql> show slave status\G
Empty set (0.00 sec)

刪除複製使用者
mysql> drop user repliform@'%';

mysql> flush privileges;

2. Master上的操作
刪除複製使用者
mysql> drop user repliform@'%';

mysql> flush privileges;

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26506993/viewspace-2142859/,如需轉載,請註明出處,否則將追究法律責任。

相關文章