Error 1050( Replicaition)

Posted on 2010-01-06
Last Modified: 2012-05-08
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 ??

Question by:fosiul01
    LVL 7

    Accepted Solution

    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

    LVL 29

    Author Comment

    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 ??
    LVL 7

    Expert Comment

    Sorry, my knowledge of a n-way multi-master setup isn't that great.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
    SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now