处理一则MySQL Slave环境出现ERROR 1201 (HY000): Could not initialize master info structure的案例
mysql> start slave;
ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository
:: [ERROR] /usr/local/mysql//libexec/mysqld: File '/data/mysqldata/3306/binlog/mysql-relay-bin.000002' not found (Errcode: 2)
:: [ERROR] Failed to open log (file '/data/mysqldata/3306/binlog/mysql-relay-bin.000002', errno )
:: [ERROR] Failed to open the relay log '/data/mysqldata/3306/binlog/mysql-relay-bin.000002' (relay_log_pos )
:: [ERROR] Could not open log file
:: [ERROR] Failed to initialize the master info structure
mysql> reset slave;
Query OK, rows affected (0.01 sec) mysql> change master to
-> master_host='10.0.0.101',
-> master_port=,
-> master_user='repl',
-> master_password='repl',
-> master_log_file='mysql-bin.000011',
-> master_log_pos=;
mysql> change master to
-> master_host='10.0.0.101',
-> master_port=,
-> master_user='repl',
-> master_password='repl',
-> master_log_file='mysql-bin.000011',
-> master_log_pos=;
ERROR (HY000): Could not initialize master info structure; more error messages can be found in the MySQL error log
:: [ERROR] Error reading master configuration
在操作系统端查看master/slave的配置文件,发现是两个0字节文件:
-rw-rw---- mysql mysql Mar : master.info
-rw-rw---- mysql mysql Mar : relay-log.info
mysql> change master to
-> master_host='10.0.0.101',
-> master_port=3306,
-> master_user='repl',
-> master_password='repl',
-> master_log_file='mysql-bin.000011',
-> master_log_pos=1;
Query OK, 0 rows affected (0.00 sec)
mysql> start slave;
Query OK, 0 rows affected (0.00 sec) mysql> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 10.0.0.101
Master_User: repl
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000011
Read_Master_Log_Pos: 101
处理一则MySQL Slave环境出现ERROR 1201 (HY000): Could not initialize master info structure的案例的更多相关文章
- ERROR 1201 (HY000) Could not initialize master info structure
1.错误原因:Slave线程启动出现问题.2.解决办法一:stop slave; reset slave; start slave; show slave status\G3.如果解决方法一,还是失败 ...
- MYSQL错误解决:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' ( ...
- 【已解决】mysql连接出错:ERROR 1040 (HY000): Too many connections
连接mysql,结果出错: ? 1 ERROR 1040 (HY000): Too many connections 去修改mysql的配置文件,然后添加: ? 1 2 3 4 5 6 7 8 9 1 ...
- 更换mysql数据目录后出现ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 的解决办法
服务器上的mysql默认数据目录为/var/lib/mysql/,同时服务器的/空间不是很大,而近期又有大量的日志需要导入进行分析,时常搞得/的空间捉襟见肘,晚上一狠心就想把mysql的数据目录转移到 ...
- mysql远程连接:ERROR 1130 (HY000): Host '*.*.*.*' is not allowed to connect to this MySQL server解决办法
安装完MySQL后,远程连接数据库的时候,出现 ERROR 1130 (HY000): Host '192.168.0.1' is not allowed to connect to this MyS ...
- Mysql连接数太多ERROR 1040 (HY000): Too many connections
数据库连接报错:ERROR 1040 (HY000): Too many connections 1.查看连接数 /usr/local/mysql/bin/mysqladmin -h host - ...
- mysql授权报错 ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
授权用户时报错,ERROR 1819 (HY000): Your password does not satisfy the current policy requirements 原因为其实与val ...
- 阿里云mysql远程登录报ERROR 2027(HY000)
mysql远程登录的命令是: mysql -h数据库地址 -u用户名 -p 但是用这个命令在登录阿里云的mysql时,会报ERROR 2027 (HY000): Malformed packet
- mysql5.7启动slave报错 ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository
原因:检查my.cnf,原来没指定relay_log,mysql默认产生的relay_log名被该server上的另一个mysql slave占用了. 解决方法:1.在my.cnf中添加 relay_ ...
随机推荐
- Objective-C 【Category-非正式协议-延展】
------------------------------------------- 类别(Category)的声明和实现 实质:类别又叫类目,它其实是对类的一个拓展!但是他不同于继承后的拓展! ...
- flume+kafka (分区实现 默认单分区) (二)
这篇文章主要在上一篇文章的基础上讲一下 如何自定义flume到kafka的分区 上一节中从下面的地址下载了一个源码 https://github.com/beyondj2ee/flumeng-kafk ...
- virtualbox安装增强包及配置共享文件夹
因为需要在host及虚拟机间传输数据,想使用共享文件夹.但是单独设置了共享文件夹后在centos里找不到共享文件夹,看了下要安装增强包.好吧,顺 便也解决下鼠标切换的问题,省的老是按右CTL切换 ...
- zedboard 构建嵌入式linux
本文通过五部完成zedboard的嵌入式LINUX搭建,所谓磨刀不五砍材工嘛 1:系统环境搭建 要准备好交叉编译环境 见http://blog.csdn.net/xiabodan/article/de ...
- zedboard搭建交叉编译环境
参考:http://blog.csdn.net/xzyiverson/article/details/11264417 我安装的LINUX12.04LTS 双系统 下载好交叉编译软件xilinx-20 ...
- [jQuery]我的封装笔记
jQuery封装插件开发入门教程: http://www.awaimai.com/467.html 一.默认值和选项 jQuery.extend函数解释 extend(dest,src1,src2,s ...
- ckeditor增加上传图片的功能
1.配置config.js开启图片上传选项卡. CKEDITOR.editorConfig = function( config ) { config.filebrowserImageUploadUr ...
- 使用Eclipse开发,Java Compiler中Annotation Processin不出现的解决方案
第一步:在Eclipse菜单栏中点击Help,在点击inatall New Software 第二步:在Work with中找到 Juno - http://download.eclipse.org/ ...
- Android实现发短信与打电话的功能
//发短信 class SendMsgClickListener implements OnClickListener { public void onClick(View v) { //调用Andr ...
- Mvc中把list从View传入Controller
public class User { public string Name { get; set; } public bool IsChecked { get;set;} public int Ag ...