免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1414 | 回复: 0
打印 上一主题 下一主题

大家帮忙看看MYSQL同步的出错问题! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-04-20 20:46 |只看该作者 |倒序浏览
请问我的MYSQL倒入数据就会出现以下的错.请问大家这是什么问题?谢谢!
mysql> show slave status\G;
*************************** 1. row ***************************
             Slave_IO_State: Waiting for master to send event
                Master_Host: 218.X.X.X
                Master_User: backup
                Master_Port: 3306
              Connect_Retry: 60
            Master_Log_File: mysql-bin.000007
        Read_Master_Log_Pos: 9590277
             Relay_Log_File: localhost-relay-bin.000002
              Relay_Log_Pos: 3750
      Relay_Master_Log_File: mysql-bin.000007
           Slave_IO_Running: Yes
          Slave_SQL_Running: No
            Replicate_Do_DB: tank2008,tank2008
这里为什么是有两个数据库名

        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 '272200' for key 1' on query. Default database: 'tank2008'. Query: 'insert into logs (ip,brower,user_lang,page_name,access_time,mid) values ('211.142.189.231','','zh-cn, en','06040099f','2008-04-20 01:26:26','00100039561735')'
               Skip_Counter: 0
        Exec_Master_Log_Pos: 6133923
            Relay_Log_Space: 3461373
            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# The MySQL server

my.cnf如下:
[mysqld]
port            = 3306
socket          = /tmp/mysql.sock
master-host     = 218.X.X.X
master-user     = backup
master-password = qwe-123!
master-port     = 3306
server-id       = 2
master-connect-retry    = 60
replicate-do-db = tank2008
log-slave-updates
1 row in set (0.00 sec)

日志:
ERROR:
No query specified

080419 14:16:29 [ERROR] Slave: Error 'Duplicate entry '272200' for key 1' on query. Default database: 'tank2008'. Query: 'insert into logs (ip,brower,user_lang,page_name,access_time,mid) values ('211.142.189.231','','zh-cn, en','06040099f','2008-04-20 01:26:26','00100039561735')', Error_code: 1062
080419 14:16:29 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.000007' position 6133923

[ 本帖最后由 jeck2006 于 2008-4-20 20:48 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP