當咱們配置好MySQL主主同步時,是能夠實現主主同步,可是重啓機器後就發現沒法同步了。
mysql replication 中slave機器上有兩個關鍵的進程,死一個都不行,一個是slave_sql_running,一個是Slave_IO_Running,一個負責與主機的io通訊,一個負責本身的slave mysql進程。
MariaDB [(none)]> stop slave; MariaDB [(none)]> SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; MariaDB [(none)]> start slave; MariaDB [(none)]> show slave status\G
MariaDB [(none)]> show master status\G
MariaDB [(none)]> slave stop; MariaDB [(none)]>CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000026', MASTER_LOG_POS=0; MariaDB [(none)]> slave start; MariaDB [(none)]> show slave status\G
問題就解決了mysql