Error 1050( Replicaition)

i have 3 way Multimaster replication.
One of Slave having this problem

 Last_Errno: 1050
                 Last_Error: Error 'Table 'test_EV' already exists' on query. Default database: 'xxxx'. Query: 'create table test_EV(
id int )'

From Slave :
 Master_Log_File: mysql-bin.000003
        Read_Master_Log_Pos: 344819

From MAster:

mysql> show master status;
| File             | Position | Binlog_Do_DB              | Binlog_Ignore_DB |
| mysql-bin.000003 |   344819 | fosiul,hesk,xxxxx| mysql,test       |

As you can see, both log positions  is same

now, if i do this :

In Master : Stop master, reset master
in Salve : stop salve, reset slave, start slave

its works fine.
but if there is any connection problems in between master and slave, after connections established, i see the same error in Slave

so what shall i do ??

LVL 29
Who is Participating?
If the slave has stopped you need to skip the query and restart it, you shouldn't need to stop the master.

stop slave;
set global sql_slave_skip_counter=1; 
start slave;

Open in new window

fosiul01Author Commented:
HI thanks

I did that one yesterday night set sql_slave

but then i see this error :

 Last_Errno: 1062
                 Last_Error: Error 'Duplicate entry '16' for key 1' on query. Default database: 'fosiul'. Query: 'INSERT /* Revision::insertOn Fosiul */  INTO `mwi_text` (old_id,old_text,old_flags) VALUES (NULL,'* How to define an array ? \n  :<pre> \n   use strict;\n   my @myarray;\n   @myarray = (\"fosiul\",\"safali\",\"yusuf\");\n   print \"@myarray\\n\";\n  </pre>','utf-8')'

which is duplicate key

in this slave , i have this setup

auto_increment_increment = 2
auto_increment_offset = 3

so where is the problem ??
Sorry, my knowledge of a n-way multi-master setup isn't that great.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.