MySQL Forums
Forum List  »  Replication

Replication Errors on Slave DB
Posted by: Mariel Gonzales
Date: February 19, 2009 04:49AM

Hi,

We are having a problem on our mirrored db(Or replication db). we have this Server1 which is the Master Sql server and Server2 is the Slave server. About a week ago the replication or sync process is oki. No problems found. But around Feb 18, i think, The slave master is no longer in sync with the Master database. How can I make them in sync again. I'm a bit newbie on mysql replication, how will I'll do this. THanks.

By the way below are the sample log file and result of show slave status.

/var/log/mysqld.log
081114 18:46:56 mysqld started
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
081114 18:46:56 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
081114 18:46:56 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
081114 18:46:56 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
081114 18:46:56 InnoDB: Started; log sequence number 0 0
081114 18:46:56 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.45' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
081114 19:04:23 [Note] /usr/libexec/mysqld: Normal shutdown

081114 19:04:23 InnoDB: Starting shutdown...
081114 19:04:24 InnoDB: Shutdown completed; log sequence number 0 43655
081114 19:04:24 [Note] /usr/libexec/mysqld: Shutdown complete

081114 19:04:24 mysqld ended

081114 19:04:25 mysqld started
081114 19:04:25 [Warning] The syntax for replication startup options is deprecated and will be removed in MySQL 5.2. Please u
se 'CHANGE MASTER' instead.
081114 19:04:25 InnoDB: Started; log sequence number 0 43655
081114 19:04:25 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL serve
r acts as a slave and has his hostname changed!! Please use '--relay-log=/var/run/mysqld/mysqld-relay-bin' to avoid this prob
lem.
081114 19:04:25 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.45' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
081114 19:04:25 [Note] Slave SQL thread initialized, starting replication in log 'FIRST' at position 0, relay log '/var/run/m
ysqld/mysqld-relay-bin.000001' position: 4
081114 19:04:25 [Note] Slave I/O thread: connected to master 'slave_user@203.190.75.231:3306', replication started in log 'F
IRST' at position 4


/etc/my.cnf(On Slave server)
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

## Slave configuration for replication purposes
server-id=2
master-host=192.168.0.1
master-user=slave_user
master-password=1235467890
master-connect-retry=60
replicate-do-db=bal
replicate-do-db=bal1
replicate-do-db=bal2
replicate-do-db=char2
replicate-do-db=yd
log-slave-updates
log-bin
log-warnings
log-error = /var/log/mysqld.log
report-host=roadimus.sikat.com

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


show slave status
Last_Errno: 0
Last_Error: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.


Hope you could help,its our prod db.

Thanks

Maye

Options: ReplyQuote


Subject
Views
Written By
Posted
Replication Errors on Slave DB
4933
February 19, 2009 04:49AM
2131
February 20, 2009 04:18AM
2047
February 20, 2009 11:09PM


Sorry, you can't reply to this topic. It has been closed.

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.