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
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