List:Replication« Previous MessageNext Message »
From:Christophe Carles Date:December 17 2013 8:35am
Subject:replication problem's with data base mysql
View as plain text  
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
server-id=2
replicate-do-db=ISFinder
relay-log-index=mysqld-bin
relay-log=mysqld-bin
log=/var/log/mysql/mysql.log
expire_logs_days        = 10
max_binlog_size         = 100M
slave-skip-errors=1062
#skip-networking
skip-external-locking
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

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,

-- 
Christophe Carles
CNRS - LMGM
Service Informatique
Bât. IBCG
118, route de Narbonne
31062 Toulouse Cedex9
sinfo@stripped
Tél : 05.61.33.59.60
Fax : 05.61.33.58.86


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