I had setup two virtual mysql database servers in two oracle linux 6 vm's, which come with mysql server ver 5.1.47
Master named prod_master & slave named prod_slave1.
I installed both the mysql servers in two virtual hosts machines with mysql_secure_installation script :
- which removes test db
- change root password
- disable remote login
The bound ip-address for prod_master to 192.168.1.100 & prod_slave1 to 192.168.1.101
- I had enabled the bin-log and index in my.cnf on master and relay log in slave. On master, I had created user repl_user and granted replication privileges and started master. The master has successfully started and created bin-log.
- When i issued the commands show master status, show binary logs, the logs are visible.
- Coming to the slave, after configuring the my.cnf, issued the change master to using repl_user with credentials and issued the command start slave.
- slave started. Then issued the command show slave status : it shows slave status like "connecting to master" in the slave attribute connection i/o error : unable to connect to the master with port no 3306.
I had granted the replication privileges with @192.168.1.%, and also issued the port on slave side. Now, here the major issue is: I couldn't connect remotely to the master or even from slave. From master connecting to slave :
mysql master> mysql -h 192.168.1.101 -uroot -proot ( not able to connect )
I am not even getting connection refused error. And the same case even from slave to the master. After starting the slave i had viewed the slave mysql.log found that slave replication thread getting dead. due to connectivity issue. Is it problem , that i had installed using the script mysql_secure_install. Please guide me. I Want to know whether :
- grant issue for replication problem (or)
- because of the script mysql_secure_install
Note : Both the master and slave vm-machines are pinging on both sides.