Description:
I followed the steps on
http://mysqlhighavailability.com/getting-started-with-mysql-group-replication/#comment-205...
to configure mysql-group-replication on two host, but only the node which first starts gcs_replication can be online, the other one is offline.
When i starts gcs_replication on the second node to join the group, the server on second node will give these errors.
[ERROR] Failed to open the relay log './gcs_recovery.000001' (relay_log_pos 4).
[ERROR] Could not find target log file mentioned in relay log info in the index file './gcs_recovery.index' during relay log initialization.
[ERROR] Plugin gcs_replication_plugin reported: '[Recovery:] Failed to setup the donor connection (relay log) metadata container.'
[ERROR] Plugin gcs_replication_plugin reported: '[Recovery:] Error when configuring the connection to the donor.'
[Note] Plugin gcs_replication_plugin reported: '[Recovery:] Retrying connection with another donor. Attempt 1/1'
[ERROR] Failed to open the relay log './gcs_recovery.000001' (relay_log_pos 4).
[ERROR] Could not find target log file mentioned in relay log info in the index file './gcs_recovery.index' during relay log initialization.
[ERROR] Plugin gcs_replication_plugin reported: '[Recovery:] Failed to setup the donor connection (relay log) metadata container.'
[ERROR] Plugin gcs_replication_plugin reported: '[Recovery:] Error when configuring the connection to the donor.'
[ERROR] Plugin gcs_replication_plugin reported: '[Recovery:] Maximum number of retries when trying to connect to a donor reached. Aborting recovery.'
2015-02-17T18:39:25.119836Z 0 [Note] Plugin gcs_replication_plugin reported: '[Recovery:] Marking view change with view_id 13'
How to repeat:
download binary version of group replication from mysql.labs.com
cd /usr/local/
ln -l /path to binary version of mysql/ mysql
cd mysql
chown -R mysql.
chgrp -R mysql.
./bin/mysql_install_db --no-defaults --user=mysql --basedir=. --datadir=data01
chown -R root.
chown -R mysql data01
./bin/mysqld --no-defaults --basedir=. --datadir=data01 -P 13001 --socket=mysqld1.sock -p
Get the password from /root/.mysql_secret
./bin/mysqladmin -u root -h 127.0.0.1 -P 13001 -p password "new_pwd"
./bin/mysql_upgrade -h 127.0.0.1 -P 13001 -u root -p
./bin/mysql -uroot -h 127.0.0.1 -P 13001 -p --prompt='server1>' -u root
server1> CREATE USER rpl_user@'%';
server1> GRANT REPLICATION SLAVE ON *.* TO rpl_user@'%' IDENTIFIED BY 'rpl_pass';
server1> FLUSH PRIVILEGES;
server1> exit
./bin/mysqladmin -h 127.0.0.1 -P 13001 -u root -p shutdown
./bin/mysqld --no-defaults --basedir=. --datadir=data01 -P 13001 --socket=mysqld1.sock --log-bin=master-bin --server-id=1 --gtid-mode=on --enforce-gtid-consistency --log-slave-updates --binlog-checksum=NONE --binlog-format=row --plugin-dir=lib/plugin --plugin-load=gcs_replication_plugin.so
./bin/mysql -uroot -h 127.0.0.1 -P 13001 -p --prompt='server1>' -u root
SET GLOBAL gcs_replication_plugin_group_name= "8a94f357-aab4-11df-86ab-c80aa9429562";
SET GLOBAL gcs_replication_plugin_recovery_user='rpl_user';
SET GLOBAL gcs_replication_plugin_recovery_password='rpl_pass';
SET GLOBAL gcs_replication_plugin_recovery_retry_count= 2;
START GCS_REPLICATION;
When i configured the first node, it worked.
then I configured the second in the same way.
After i entered 'START GCS_REPLICATION;', i got the errors posted previously.