MySQL主从同步问题

主从同步出现

Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Client request ed master to start replication from impossible position'

先在主库上
mysql> show master status
    -> ;
+------------------+----------+--------------+------------------+
| File             | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000034 |     6609 |              |                  |
+------------------+----------+--------------+------------------+
1 row in set (0.00 sec)

在从库上,记住主库的binlog文件和pos点

mysql> stop slave;
mysql> CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000034', MASTER_LOG_POS=6609; 
mysql> start slave;
mysql> show slave status\G





标签:

上一篇MySQL This function has none of DETERMINISTIC, NO SQL...错误1418
下一篇如何正确清理MySQL binlog?

相关文章