In MySQL, cocould not initialize master info structure is fixed.

Source: Internet
Author: User

The error "ocould not initialize master info structure" is prompted when mysql is used today. I will summarize the solution for you.

MySQL sets synchronization Replication and splits the following commands into two groups of inputs, as shown below:

1. mysql> change master to MASTER_HOST = 'master .example.com ', MASTER_USER = 'repl', MASTER_PASSWORD = 'repl _ password ';
2. mysql> change master to MASTER_LOG_FILE = 'mysql-bin.000001 ', MASTER_LOG_POS = 107;
After Replication is set, cannot start slave? Why? The following error message is displayed:

Cocould not initialize master info structure, more error messages can be found in the MySQL error log

How can this problem be solved?


MySQL Replication has a cocould not initialize master info structure fix
MySQL error log does not display any error messages. You can refer to the discussion in this article: MySQL: cocould not initialize master info structure, more error messages can be found in the MySQL error log.

The following is a direct write solution:

The Code is as follows: Copy code
1. mysql> reset slave; # focus on this line
2. mysql> change master to MASTER_LOG_FILE = 'mysql-bin.000001 ', MASTER_LOG_POS = 107; # Set it according TO your own Environment
3. mysql> start slave; # It Will Be normal.

4 .? : Resetting slave, MASTER_LOG_FILE, and MASTER_LOG_POS will be cleared, so you need to reset them.

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.