MySql slaves on Amazon EC2 RHEL 7.6 server not getting connected automatically after mysql service restart on master
See original GitHub issueI have setup MySQL Master - slave replication on Amazon EC2 instance. OS : RHEL 7.6 MySQL Version: 8.0.13 Mater server IP : 192.168.1.128 Slave server IP : 192.168.1.129
I have two ec2 instance on which i have configured one ec2 as Master and another one as its slave. I have created user “replicator” on master server for replication with " %" host. After executing change master statement on slave server as mentioned below.
CHANGE MASTER TO MASTER_HOST='192.168.1.128',MASTER_USER='replicator', MASTER_PASSWORD='Replication@123', MASTER_HEARTBEAT_PERIOD=5, MASTER_LOG_FILE='mysql-bin.000063', MASTER_LOG_POS=195;
I have executed start slave and show slave status\G command on slave server i.e. on 192.168.1.129 . i have got following error:
Slave_IO_State: Connecting to master
Master_Host: 192.168.1.128
Master_User: replicator
Slave_IO_Running: Connecting
Slave_SQL_Running: Yes
Last_IO_Error: error connecting to master 'replication@192.168.1.128:3306' - retry-time: 60 retries: 8
Then i have taken login to master mysql server from slave server i.e. mysql -u replicator -p -h192.168.1.128 slave started sucessfully.
show slave status\G ouput:
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
After all these i came to know that i have to repeat this step i.e. mysql -u replicator -p -h192.168.1.128 from slave server every time whenever master MySQL services restart. Otherwise replication will not start and will get same error as describe above i,e. error connecting to master ‘replication@192.168.1.128:3306’
So can anyone help to fixed this issue.
Thanks in Advance
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (6 by maintainers)
Oh, I used the word support instead of contact, which lead me to https://www.mysql.com/support/
So Oracle is the company who writes the mysql server software. I have never tried to get support from them before, so not sure if there is some kind of free support method or not off hand.