处理一则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_ ...
随机推荐
- 基于jquery的inputlimiter 实现字数限制功能
html代码: <td>内容摘要:</td> <td> <textarea id="content_summary" rows=5 nam ...
- Collection 和 Collections的区别。
Collection 和 Collections的区别. Collections是个java.util下的类,它包含有各种有关集合操作的静态方法. Collection是个java.util下的接口, ...
- C# 上传图片前判断上传图片的宽和高
网上找了好久没有找到... 最后百度到了这句话“由上传的HttpPostFile的InputStream创建一个Image对象,然后想怎么处置就随便你了”. HTML代码: <asp:FileU ...
- c#实现数据集合转换为csv文本
需求 1.将一个数据集合导出到一个csv文件中,集合类型可以视为 List<T>,T为任意类型,T包含多个属性,可指定部分属性进行导出 2.软件中有多种不同类型的数据类型需要进行导出 需求 ...
- 20150301—ASP.NET的Repeater
Repeater与GridView等数据列表一样,都是用来显示数据库的信息的,其中Repeater是最基本的列表形式,其用法也比较灵活. 一.Repeater的位置: 工具箱-数据-Repeater ...
- js中的scroll和offset 的使用比较
1.offsetTop :当前对象到其上级层顶部的距离.不能对其进行赋值.设置对象到页面顶部的距离请用style.top属性. 2.offsetLeft :当前对象到其上级层左边的距离. ...
- 分享10 个超酷的 HTML5/CSS3 应用及源码
1.HTML5视频破碎重组特效,强大视觉冲击 HTML5视频播放器很多,但是HTML5视频特效还是很少见的,这款HTML5视频破碎重组特效非常刺激,给人强大的视觉冲击.点击视频任意地方,HTML5将会 ...
- 【Qt】Qt之自定义界面(窗体缩放)【转】
简述 通过前两节内容,我们实现了自定义窗体的移动,以及自定义标题栏-用来显示窗体的图标.标题,以及控制窗体最小化.最大化.关闭. 在这之后,我们还缺少窗体的缩放-当鼠标移动到窗体的边框-左.上.右.下 ...
- jQuery 添加元素和删除元素
jQuery - 添加元素 append() - 在被选元素的结尾插入内容 prepend() - 在被选元素的开头插入内容 after() - 在被选元素之后插入内容 before() - 在被选元 ...
- Vim一些实用的用法
打开多个文件: 1.vim还没有启动的时候:在终端里输入 vim file1 file2 ... filen便可以打开所有想要打开的文件2.vim已经启动输入:open file可以再打开一个文件,并 ...