- 论坛徽章:
- 0
|
请问我的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 编辑 ] |
|