MySQL主从复制 同步状态异常
Last_Error(最后一个错误信息)
Error 'Duplicate entry '8ab3d90d7d77390495a11b7582e966ca' for key 'PRIMARY'' on query. Default database: 'zjcapp1'. Query: 'INSERT INTO `mac_vod_search` (`search_key`
`search_word`
`search_field`
`search_hit_count`
`search_last_hit_time`
`search_update_time`
`search_result_count`
`search_result_ids`) VALUES ('8ab3d90d7d77390495a11b7582e966ca'
'滤镜'
'vod_name|vod_en'
1
1741015643
1741015643
2
'39764
45063')'
可以看到最后一个错误信息是SQL 插入操作时遇到了主键冲突问题,
分别执行下列代码可解决
mysql -u root -p
主:
18024204f20da414
109:
e787c49930e30ef3
45:
1f2b19bdd8f60301
38:
9da3f5da89605934
103:
6a97bdb38b1af4b4
STOP SLAVE;
USE zjc_app;
DELETE FROM mac_vod_search WHERE search_key = '8ab3d90d7d77390495a11b7582e966ca';
START SLAVE;