ERROR 1201 (HY000):Could not initialize master info structure,ERROR 29 (HY000): File'./web_appdb_的问题
来源:互联网 发布:高三励志语录知乎 编辑:程序博客网 时间:2024/04/28 19:55
今天在做MySQL主从复制时遇到个ERROR 1201 (HY000): Could not initialize master info structure .
出现这个问题的原因是之前曾做过主从复制!
www.2cto.com
解决方案是:运行命令 stop slave;
成功执行后继续运行 reset slave;
然后进行运行GRANT命令重新设置主从复制。
具体过程如下:
Command代码
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)
假如报错:
ERROR 29 (HY000): File'./web_appdb_1-relay-bin.000376' not found (Errcode: 2)
报错原因:中继日志索引文件中存在很多中继日志记录,但是那些中继日志物理上被删除了。
解决办法:备份下中继日志索引文件,并清空中继日志索引文件,然后再reset slave。
[root@web_appdb_1 mysql]# cpweb_appdb_1-relay-bin.index web_appdb_1-relay-bin.index_bak
[root@web_appdb_1 mysql]# true >web_appdb_1-relay-bin.index
mysql> reset slave;
Query OK, 0 rows affected (0.00 sec)
mysql> CHANGE MASTER TOMASTER_USER='RepUser',MASTER_HOST='10.0.3.117',MASTER_PASSWORD='Mysql_yunmenhu',MASTER_PORT=3306,MASTER_LOG_FILE='mysql-bin.048379',MASTER_LOG_POS=2740;
Query OK, 0 rows affected (0.02 sec)
mysql> start slave;
Query OK, 0 rows affected (0.01 sec)
--本篇文章转自:http://www.2cto.com/database/201301/185975.html
0 0
- ERROR 1201 (HY000):Could not initialize master info structure,ERROR 29 (HY000): File'./web_appdb_的问题
- ERROR 1201 (HY000): Could not initialize master info structure
- 解决ERROR 1201 (HY000): Could not initialize master info structure
- ERROR 1201 (HY000): Could not initialize master info structure解决方法
- ERROR 1201 (HY000):Could not initialize master info structure的问题(转载)
- MySQL Slave环境出现ERROR 1201 (HY000): Could not initialize master info structure的案例
- ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in
- ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in
- MySQL主从复制:ERROR 1201 (HY000): Could not initialize master info structure.
- ERROR 1201 (HY000): Could not initialize master!解决方法
- mysql Could not initialize master info structure;
- Could not initialize master info structure; more error messages can be found in the MySQL error log
- mysql Could not initialize master info structure; more error messages can be found in the MySQL erro
- mysql Could not initialize master info structure 解决方法
- 故障案例:级联主从change master to Could not initialize master info structure
- 解决“Error 1(HY000): Can't create/write file”问题
- mysql错误:ERROR 29 (HY000): File '/tmp/cun' not found (Errcode: 13)
- load data infile:ERROR 29 (HY000): File '' not found (Errcode: 13
- JSTL函数标签库 fn标签
- CodeForces 616E Sum of Remainders(数论)
- 正则拓展: 匹配大陆和港式身份证
- android 属性文件default.prop与adb
- JAVA中常用IO流类:FileInputStream和FileOutputStream
- ERROR 1201 (HY000):Could not initialize master info structure,ERROR 29 (HY000): File'./web_appdb_的问题
- jstl 格式化时间日期标签讲解
- openwrt创建软件包
- Protobuffer的研究史
- SCSI work flow
- PITF(Pairwise Interaction Tensor Factorization)分解
- 为什么都要在主线程中更新UI(iOS开发)
- 用java实现二维数组的“之”字形输出
- 为ios程序设置环境变量