problem goes something like this: mysql master-slave replication. After configuration, check that the slave table has a normal status:
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
then insert data into the master table without Synchronize, and the status is abnormal:
Slave_IO_Running: Yes
Slave_SQL_Running: No
the details are as follows:
the master library is on the windows and the slave library is on the virtual machine;
the master library is configured my.ini
[mysqld]
-sharp
-sharp "mysql-bin"
log-bin=mysql-bin
server-id=1
binlog-do-db=blog
configure my.cfg
[mysqld]
server-id = 2
port = 3306
log-bin=mysql-bin
binlog_format=mixed
windows executes show master status;
as follows
+------------------+----------+--------------+------------------+-------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+--------------+------------------+-------------------+
| mysql-bin.000035 | 1253 | blog | | |
+------------------+----------+--------------+------------------+-------------------+
Virtual machine execution
stop slave;
CHANGE MASTER TO MASTER_HOST="192.168.1.110",
MASTER_USER="root",
MASTER_PASSWORD="root",
MASTER_LOG_FILE="mysql-bin.000035",
MASTER_LOG_POS=1253;
start slave;
show slave status \G;
shows the following
insertshow slave status \G;
:Slave_IO_Running: Yes
Slave_SQL_Running: No
last error
Last_Error: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master"s binary log is corrupted (you can check this by running "mysqlbinlog" on the binary log), the slave"s relay log is corrupted (you can check this by running" mysqlbinlog" on the relay log), a network problem, or a bug in the master"s or slave"s MySQL code. If you want to check the master"s binary log or slave"s relay log, you will be able to know their names by issuing "SHOW SLAVE STATUS" on this slave.
use mysqlbinlog relay-log.info
to see the following error
ERROR: File is not a binary log file.
what may have gone wrong?