从库show slave status\G 显示 :
Master_Log_File: mysql-bin.000032
Read_Master_Log_Pos: 7271908
Relay_Log_File: ct-smg7-relay-bin.000063
Relay_Log_Pos: 7272045主库show master status\G 显示:
File: mysql-bin.000032
Position: 7209133为什么从库的Read_Master_Log_Pos和Relay_Log_Pos会比主库的Position大很多呢
做主从时 在load data from master 时候可能由于数据多 从库更新时间长,不知道是不是load data死掉了,就手动停止从库load data from master,之后发现主库的表仍然处在锁表的状态,
查看mysql进程 :
| 3831 | repluser | 218.201.202.91:44410 | NULL | Binlog Dump | 1014 | Has sent all binlog to slave; waiting for binlog to be updated | NULL |
| 3885 | repluser | 218.201.202.91:44411 | NULL | Query | 948 | Flushing tables | FLUSH TABLES WITH READ LOCK kill了锁表进程后查看,此进程仍然存在。查看端口状态 发现有如下一个状态:
tcp 1 0 ***.***.***.70:3306 ***.***.***.71:44411 CLOSE_WAIT 17329/mysqld之后分别重启了主库和从库的mysql
查看一下主从数据文件,发现一致,并且可以同步。
但就是从的Read_Master_Log_Pos和Relay_Log_Pos会比主库的Position大
希望大家指点一下
Master_Log_File: mysql-bin.000032
Read_Master_Log_Pos: 7271908
Relay_Log_File: ct-smg7-relay-bin.000063
Relay_Log_Pos: 7272045主库show master status\G 显示:
File: mysql-bin.000032
Position: 7209133为什么从库的Read_Master_Log_Pos和Relay_Log_Pos会比主库的Position大很多呢
做主从时 在load data from master 时候可能由于数据多 从库更新时间长,不知道是不是load data死掉了,就手动停止从库load data from master,之后发现主库的表仍然处在锁表的状态,
查看mysql进程 :
| 3831 | repluser | 218.201.202.91:44410 | NULL | Binlog Dump | 1014 | Has sent all binlog to slave; waiting for binlog to be updated | NULL |
| 3885 | repluser | 218.201.202.91:44411 | NULL | Query | 948 | Flushing tables | FLUSH TABLES WITH READ LOCK kill了锁表进程后查看,此进程仍然存在。查看端口状态 发现有如下一个状态:
tcp 1 0 ***.***.***.70:3306 ***.***.***.71:44411 CLOSE_WAIT 17329/mysqld之后分别重启了主库和从库的mysql
查看一下主从数据文件,发现一致,并且可以同步。
但就是从的Read_Master_Log_Pos和Relay_Log_Pos会比主库的Position大
希望大家指点一下
因为你先看的master status 然后再看的slave status 你看savel status的时候 master那边已经过了很多了