Home > Database > Mysql Tutorial > body text

ERROR 1201 (HY000):Could not initialize master inf

WBOY
Release: 2016-06-07 16:35:17
Original
1374 people have browsed it

(转)在做MySQL主从复制时遇到个ERROR 1201 (HY000): Could not initialize master info structure . 出现这个问题的原因是之前曾做过主从复制! 解决方案是: 运行命令 stop slave; 成功执行后继续运行 reset slave; 然后重新设置主从复制。 具体过程如下:

(转)在做MySQL主从复制时遇到个ERROR 1201 (HY000): Could not initialize master info structure .
出现这个问题的原因是之前曾做过主从复制!
  
解决方案是:

运行命令 stop slave;
成功执行后继续运行 reset slave;
然后重新设置主从复制。

具体过程如下:

mysql> change master to master_host='127.0.0.1', master_user='user', master_pass  
word='user', master_log_file='mysql-bin-000202', master_log_pos=553;  
ERROR 1201 (HY000): Could not initialize master info structure; more error messa  
ges can be found in the MySQL error log  
mysql> stop slave;  
Query OK, 0 rows affected, 1 warning (0.00 sec)  
  
mysql> reset slave;  
Query OK, 0 rows affected (0.00 sec)  
  
mysql> change master to master_host='127.0.0.1', master_user='user', master_pass  
word='user', master_log_file='mysql-bin-000202', master_log_pos=553;  
Query OK, 0 rows affected (0.11 sec)  

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!