MySQL master-slave configuration problem collation

Source: Internet
Author: User

The database needs to be built in the previous time line. Because you do not want to back up the database, you intend to clone the database virtual machine directly to a new one, and then configure Master-slave synchronization. I have not done so before, so I have not encountered any problems, today to put together a bit of the problems encountered.

192.168.3.1 database (Master)---Cloning---> 192.168.3.2 database (slave)

1. After cloning, turn on Master's Binlog log and authorize.

2.slave configuration, point to Master, synchronize data.

Mysql>Change MASTER to     -Master_host='192.168.3.1',     -Master_user='Slaveuser',     -Master_password='Password',     -Master_port=3306,     -Master_log_file='mysql-bin.000001',     -Master_log_pos= -; Query OK,0Rows affected,2Warnings (0.02Sec

3. The following problems have been encountered:

Question one:

1872 (HY000): Slave failed to initialize relay log info structure from the

Workaround:

Stop Slave;reset Slave;start slave;

Question two:

Last_io_error:fatal error:the slave I/O thread stops because master and slave have equal MySQL server UUIDs; These uuids must is different for replication to work.

Workaround:

Modify the auto.conf file, change the UUID different from the main library, and restart MySQL.

MySQL master-slave configuration problem collation

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.