mysql5.5.44 Master-slave replication configuration
Note: MySQL does not support "Master-host" similar parameters in MY.CNF since 5.1.7;
The following commands must be executed in MySQL for slave (the last POS has no quotes):
mysql> Change Master to master_host= ' 192.168.137.100 ', master_user= ' Tongbu ', master_password= ' 123456 ', Master_log_ File= ' mysql-bin.000014 ', master_log_pos=107;
Mysql>flush privileges;
Mysql>quit
/etc/init.d/mysqld Restart # restart MySQL Service
Main MySQL authorization mysql> grant replication Slave on * * to ' tongbu ' @ '% ' identified by ' 123456 ';
After the master and slave restart MySQL, check the slave status:
Mysql> show slave status \g;
Slave_io_running:connecting
Slave_sql_running:yes
After Slave_io_running:no
Check The Tail/data/mysql3306/localhost.localdomain.err log discovery hint that master and slave have equal MySQL server IDs.
MY.CNF set the server_id to 1 and 2 respectively, what's the situation?!
Mysql> Show variables like ' server_id '; # View Server ID
Simple modification of my.cnf and reboots does not resolve this issue.
The final discovery is according to the directory has another my.cnf existence reason, delete, solve.
Be sure to keep an eye out for such redundant configuration files.
mysql5.5.44 master and slave have equal MySQL server IDs