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.