mysql5.5.44 master and slave have equal MySQL server IDs

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.