我的MySQL从属服务器已停止复制其';主人
我有一个备份服务器,它可以复制我的生产服务器的mysql数据库。不久前,我用相同的php脚本设置了一个暂存服务器,唯一的区别是我给了它一个只读mysql用户,所以它不能更改数据库,只能从数据库中读取。我不确定是否与此有关,但今天我看到备份已停止工作,并出现以下错误:我的MySQL从属服务器已停止复制其';主人,mysql,database-replication,mysql-backup,Mysql,Database Replication,Mysql Backup,我有一个备份服务器,它可以复制我的生产服务器的mysql数据库。不久前,我用相同的php脚本设置了一个暂存服务器,唯一的区别是我给了它一个只读mysql用户,所以它不能更改数据库,只能从数据库中读取。我不确定是否与此有关,但今天我看到备份已停止工作,并出现以下错误: Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication fr
Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position'
以下是脉泽的输出:
File: mysql-bin.000208
Position: 24383202
Binlog_Do_DB: sexxymofo
Binlog_Ignore_DB:
奴隶:
Slave_IO_State:
Master_Host: 184.168.76.5
Master_User: repl
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000193
Read_Master_Log_Pos: 54442531
Relay_Log_File: mysqld-relay-bin.000155
Relay_Log_Pos: 54442676
Relay_Master_Log_File: mysql-bin.000193
Slave_IO_Running: No
Slave_SQL_Running: Yes
Replicate_Do_DB: sexxymofo
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 54442531
Relay_Log_Space: 54442875
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 1236
Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position'
Last_SQL_Errno: 0
Last_SQL_Error:
正如你所看到的,奴隶已经超越了主人,进入了一个不存在的位置,有人能帮忙吗?我可能会重新启动该过程,但我希望确保不会再次发生。位置是文件中的位置,因此从机位于文件mysql-bin.000193后面,而主机已经位于mysql-bin.000208上
此设置的不可能之处可能是主设备已清除了文件mysql-bin.000193,并且由于从设备未运行IO,因此该文件未被传输。是否重新启动复制过程?你说得对,mysql-bin.000210文件是主机保存的最后一个日志!“正确”的做法是从主服务器进行新的转储,并将其加载到从服务器并启动它。如果您有足够小的数据集,并且能够承受很小的停机时间,那么这是一项很容易做到的工作。