4

I was trying to implement Master-Slave Database Replication on two systems.
I followed the steps from the following links
https://www.youtube.com/watch?v=DmQWcU2INqQ
and
Master Slave Replication

But in both cases, I ended up with

Slave_IO_Running: Connecting
Slave_SQL_Running: Yes

I've tried to check the network connection between the machines and they're able to ping each other successfully.
Disabled the antiviruses and Firewalls on both systems
Added an alias for the slave to access the master machine, Working.
Both machines using 3306 port for mysql.

Last_IO_error: error connecting to master 'user01@192.168.2.46:3306' -- retry-time 60 retries: 1

4

I faced a similar error some days ago. I was able to solve that error based on some Google search results. Here are some of the suggestions that might hopefully help you too:

  1. Check whether you created the replication user with required privileges. If not, create a new user on master with the following command:

    Create user ‘repl’@’192.168.2.46’ identified by ‘replpwd’;
    Grant replication slave on *.* to ‘repl’@’192.168.2.46’;
    
  2. If you already created the required replication user, check the privileges of the replication user. You can check the privileges by using the following command:

    show grants for repl;
    
  3. Usually, this issue occurs because of the incorrect password. In that case you can reset the password on the slave by using the following command:

    change master to master_password = 'rplpassword';
    
  4. Also, check the for any mistakes in the given replication user and host IP address.

Since, you are able to ping the master server, it is most probably because of the above mentioned reason.

  • this one, plus try logging in to the master from the slave server. mysql -urepl -p -hmaster_ip if it works or not... – jerichorivera Jun 12 '16 at 14:59
  • I've tried all the above mentioned solutions and none of them seem to fix the problem. Are there any missing points in the video that i need to check in order to fix this issue. – Eric Bana Jun 20 '16 at 5:44
  • @EricBana on master: show grants for 'user01'; – jerichorivera Jun 20 '16 at 11:59
  • 1
    @rathishDBA I had replication on the mysql database which should replicate users too. As part of setting up slave, I made a dump of the application db and the mysql db and imported into the slave. Assumed slave_user will be replicated along with the right password. The slave_user was there but the password did not work. Resetting the master password made it work. Thank you! – Kalyan Jun 15 '18 at 19:14
1

You should also check that these two lines are commented on the Master side (for networking issues) as shown below.

# skip-networking  
# bind-address = 127.0.0.1

For complete details on master slave replication, follow this link.

0

I faced the same issue with the MySQL replication.
I had given the GRANT ALL privileges, which solved my issue, as follows:

GRANT ALL ON *.* TO 'slave_user'@'%' IDENTIFIED BY 'password';
  • You may need to flush your privileges after you set them. This is what I forgot to do after setting some grants. FLUSH PRIVILEGES; FLUSH TABLES WITH READ LOCK; – nebulr Jan 17 '18 at 18:39
0

Try the following:

  1. Stop slave
  2. Start slave

It solved the problem for me today.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.