MySQL Forums
Forum List  »  Replication

Failed to open the relay log on Master
Posted by: Imran Akbar
Date: April 08, 2013 02:56PM

Hi,

After upgrading to MySQL 5.6.10 on my master and slave machines, I see this error in my master's logs:

[ERROR] Failed to open the relay log './mysqld-relay-bin.000001' (relay_log_pos 4).
[ERROR] Could not find target log file mentioned in relay log info in the index file './sjvs6-cerberus-relay-bin.index' during relay log initialization.
[ERROR] Failed to initialize the master info structure

According to the blog post here, this happens when the hostname changes:
https://blogs.oracle.com/trentlloyd/entry/watch_out_for_hostname_changes
I think it's not the hostname that changed, but the settings in my.cnf, because I now have relay logs with 3 different prefixes in /usr/lib/mysql, like:

mysqld-relay-bin.000001
mysql-relay-bin.000001
sjvs6-cerberus-relay-bin.000001

The weird thing is, the files in the error messages do exist, and mysql has permissions to them.

Any ideas how to fix this?
I don't mind resetting my slaves - I'd just like to get replication working again.

the master's my.cnf is below:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
innodb_buffer_pool_size=256M
max_allowed_packet=2M
slow_query_log=1
slow_query_log_file=/var/log/mysqld-slow.log
default-storage-engine=InnoDB
skip_secure_auth
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

# Configure and enable replication
log_bin=mysql-bin
server_id=36
binlog-format=mixed
report-host=cerberus

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

thanks,
imran

Options: ReplyQuote


Subject
Views
Written By
Posted
Failed to open the relay log on Master
6333
April 08, 2013 02:56PM


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.