MySQL Mutual master from replication FAQ

Source: Internet
Author: User

Error:
1)
Change Master results in:
Last_io_error:error Connecting to master-retry-time:60 retries

2)
To stop the slave process without unlocking:
> Stop slave;
ERROR 1192 (HY000): Can ' t execute the given command because you had active locked tables or an active transaction

3)
Change master syntax error, comma dropped
Mysql> Change Master to
-Master_host= ' IP '
-master_user= ' user ',
Master_password= ' PASSWD ',
Master_log_file= ' mysql-bin.000002 ',
master_log_pos=106;
Error 1064 (42000): You have a error in your SQL syntax; Check the manual, corresponds to your MySQL server version for the right syntax to use near ' master_user= ' user ',
Master_password= ' PASSWD ',
Master_log_file= ' mysql-bin.000002 ' at line 3

4)
Change master without stopping the slave process
mysql> Change Master to master_host= ' IP ', master_user= ' user ', master_password= ' PASSWD ', master_log_file= ' Mysql-bin.000001 ', master_log_pos=106;
ERROR 1198 (HY000): This operation cannot is performed with a running slave; Run STOP SLAVE First

5)
The Server-id of a B are the same:
Last_io_error:fatal error:the slave I/O thread stops because master and slave have equal MySQL server IDs;
These IDs must be different for replication to work (or the--replicate-same-server-id option must is used on
Slave but this does don't always make sense; Please check the manual before using it).
View Server-id
Mysql> Show variables like ' server_id ';
Manually modifying Server-id
mysql> set global server_id=2; #此处的数值和my. CNF, just set it up.
mysql> slave start;

6) After change master, check the status of slave and discover that slave_io_running is no
It is important to note that the MySQL process is finally restarted after the above operation has been completed

Excerpt from: ANLJF's Column

MySQL Mutual master from replication FAQ

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.