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

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.