List:Replication« Previous MessageNext Message »
From:Shawn Green Date:December 17 2013 8:23pm
Subject:Re: replication problem's with data base mysql
View as plain text  
Hello Christophe,

On 12/17/2013 3:35 AM, Christophe Carles wrote:
> Hello,
>
> I contact you about a problem with replication Databases with MySQL.
> We have a main master MySQL database server that contains data unit.
> This server is only accessible internally.
> We have LAMP servers in DMZ (accessible from the Internet) that
> are slaves of the master.
> The configuration is done with the file / etc / my.cnf (the servers are
> under centos)
> Below is a sample configuration of a slave:
> [mysqld]
> datadir=/var/lib/mysql
> socket=/var/lib/mysql/mysql.sock
> user=mysql
> # Disabling symbolic-links is recommended to prevent assorted security
> risks
> symbolic-links=0
> master-host=peric2.ibcg.biotoul.fr
> master-user=XXXX
> master-password=XXXXXX
> master-port=3306
...
The use of these settings are deprecated. You should only set or change 
your replication coordinates using a CHANGE MASTER TO... command.

>
> We had a web server who had shutdown.
> I make another one (VM) with the necessary services : http, mysql , php,
> etc ...
> When I configured to replicate the master database , I got an error
> message in : / var / log / mysqld.log
> [Note ] Slave I / O thread: Failed reading log event , reconnecting to
> retry , log ' FIRST ' at position 4
> [ERROR ] Error reading packet from server : File '# ./mysqld-bin.000001
> ' not found ( errno: 2) ( server_errno = 29)
>
> On the master , I also receive an error message in / var / log / mysqld.log
> [ERROR ] Failed to open log ( file ' # ./mysqld-bin.000001 ', errno 2)
>
> I made several search on google and I've tested several things on slave
> like deletes logs, configuration file my.cnf ...
> I have found a solution applied is clean logs master server with FLUSH
> LOGS.
> Because this server is used for replication to other bases, I have not
> tried this command.
>
> Is one of you have already met this kind of problems?
> Is using FLUSH LOGS you seem relevant in a case like mine?
>
> Regards,
>

The problem is not with your master. The problem is how you told your 
slave to start replicating.

This new slave is a copy of some data that corresponds to the state that 
the master was in at a particular location in its binary logs (a file 
name and an offset -or- a GTID value). That is where you needed to have 
this slave start replicating from. Because you did not provide the 
correct coordinates (or any at all) you attempted to start from the 
first position of the first binary log. As you can see, that file no 
longer exists.

What you need to know is what binary log coordinates match the state of 
the data you created this new VM with. This we cannot tell you as we 
have no details of where your data originated or how you created the copy.

Regards,
-- 
Shawn Green
MySQL Senior Principal Technical Support Engineer
Oracle USA, Inc. - Hardware and Software, Engineered to Work Together.
Office: Blountville, TN
Thread
replication problem's with data base mysqlChristophe Carles17 Dec
  • Re: replication problem's with data base mysqlShawn Green17 Dec
  • Re: replication problem's with data base mysqlChristophe Carles18 Dec
    • Re: replication problem's with data base mysqlShawn Green18 Dec
      • Re: replication problem's with data base mysqlMarcus Bointon18 Dec
        • Re: replication problem's with data base mysqlShawn Green18 Dec
Re: replication problem's with data base mysqlChristophe Carles20 Dec