mysql主从复制,Last_Error:Error 'Duplicate entry '%-test-'。。。
时间:2010-10-12
来源:互联网
本帖最后由 轻逐微风 于 2010-10-12 09:46 编辑
mysql> show slave status\G;
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.1.31
Master_User: slave
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000006
Read_Master_Log_Pos: 308
Relay_Log_File: localhost-relay-bin.000002
Relay_Log_Pos: 13476
Relay_Master_Log_File: mysql-bin.000001
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 1062
Last_Error: Error 'Duplicate entry '%-test-' for key 1' on quer
y. Default database: 'mysql'. Query: 'INSERT INTO db SELECT * FROM tmp_db WHERE
@had_db_table=0'
Skip_Counter: 0
Exec_Master_Log_Pos: 13339
Relay_Log_Space: 645619
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
1 row in set (0.00 sec)
ERROR:
No query specified
复制代码
mysql> show slave status\G;
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.1.31
Master_User: slave
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000006
Read_Master_Log_Pos: 308
Relay_Log_File: localhost-relay-bin.000002
Relay_Log_Pos: 13476
Relay_Master_Log_File: mysql-bin.000001
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 1062
Last_Error: Error 'Duplicate entry '%-test-' for key 1' on quer
y. Default database: 'mysql'. Query: 'INSERT INTO db SELECT * FROM tmp_db WHERE
@had_db_table=0'
Skip_Counter: 0
Exec_Master_Log_Pos: 13339
Relay_Log_Space: 645619
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
1 row in set (0.00 sec)
ERROR:
No query specified
- 如何解决呢?
- Last_Error: Error 'Duplicate entry '%-test-' for key 1' on quer
- y. Default database: 'mysql'. Query: 'INSERT INTO db SELECT * FROM tmp_db WHERE
- @had_db_table=0'
作者: 轻逐微风 发布时间: 2010-10-12
没有搞过mysql的集群阿。
作者: renxiao2003 发布时间: 2010-10-12
回复 轻逐微风
解决办法:
解决办法:
mysql> STOP SLAVE;
mysql> SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
mysql> START SLAVE;
原文:http://www.howtoforge.com/how-to-repair-mysql-replication
作者: 轻逐微风 发布时间: 2010-10-12
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28