MySQL cannot master-slave replication solution. mysql master-slave
<Span style = "font-size: 18px;"> ******** the slave database cannot be synchronized ******** show slave status to show that slave_ SQL _runing is NO, seconds_behind_master is null. Cause: A: The program may perform write operations on slave. B: It may also be caused by transaction rollback after the slave machine is restarted. solution 1: slave stop; set GLOBAL SQL _SLAVE_SKIP_COUNTER = 1; set a GLOBAL parameter slave start; solution 2: (1): salve (slave) database, slave stop; -- stop the slave Service master (master) database, show master status; get & A log file name & B location -- get the current binary log and offset on the master server (2): salve Database: View status, if yes, perform manual synchronization on the salve server. Manually change master to master_host = "192.168.101.1", master_uset = "user1", master_password = "pass123456", master_port = 3306, master_log_file = "mysql-bin.00003", step (1) found & A log file name master_log_pos = 98; step (1) found & B location -- can be manually synchronized after (3) start salve start. (4) Check Salve_ SQL _Runing as yes by using show salve status. If Seconds_Behind_Master is 0, it is normal </span>
Mysql master-slave replication is not synchronized
Error message?
Mysql master-slave replication, problems encountered after linux restart
Mysql restarts on the host, but the binlog index is inconsistent only when your slave mysql is not restarted, before the slave mysql instance restarts, The slave_io_running thread always keeps communicating with the host and transmits binlog updates. After the host crashes, slave_io_running will wait until the status changes to NO, and the entire replication will stop. It should be said that the host is in sleep state. After the host recovers, it cannot be identified from the host, you can only stop the slave and start it again, or change the master operation. Actually, you can only restart the slave mysql.