patternsqlMinor
Slave_IO_Running: Connecting in Master-Slave Replication
Viewed 0 times
connectingslavereplicationmasterslave_io_running
Problem
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
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
Solution
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:
-
Check whether you created the replication user with required privileges. If not, create a new user on master with the following command:
-
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:
-
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:
-
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.
-
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’;-
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;-
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';-
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.
Code Snippets
Create user ‘repl’@’192.168.2.46’ identified by ‘replpwd’;
Grant replication slave on *.* to ‘repl’@’192.168.2.46’;show grants for repl;change master to master_password = 'rplpassword';Context
StackExchange Database Administrators Q#140929, answer score: 6
Revisions (0)
No revisions yet.