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





分享到:

网友留言(0 条)

发表评论