hi all,
i have case.
this is my table
+-------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| val | varchar(50) | NO | | | |
+-------+-------------+------+-----+---------+----------------+
slave just update data (not load from master). And then master update data
to.
with SHOW SLAVE STATUS; I get this error:
mysql> SHOW SLAVE STATUS\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.1.139
Master_User: replika
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000001
Read_Master_Log_Pos: 732
Relay_Log_File: slave-relay.000003
Relay_Log_Pos: 567
Relay_Master_Log_File: mysql-bin.000001
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB: replika
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 '5' for key 1' on query. Def
ault database: 'replika'. Query: 'INSERT INTO `test` (`id`, `val`) VALUES
(NULL,
'sembarang')'
Skip_Counter: 0
Exec_Master_Log_Pos: 430
Relay_Log_Space: 869
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)
How to automatic fixed this error case?