mysql replicate error
工作日志之-MySQL slave Replication Error
Description:
mysql> start slave;
ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in the MySQL error log
[root@slave ~]# tail /var/log/mysqld.log
090105 11:53:52 [ERROR] Failed to open the relay log '/var/run/mysqld/mysqld-relay-bin.000013' (relay_log_pos 235)
090105 11:53:52 [ERROR] Could not find target log during relay log initialization
...
[root@slave mysql]# ls /var/run/mysqld/
mysqld-relay-bin.000001 mysqld-relay-bin.000003 mysqld-relay-bin.000005 mysqld-relay-bin.index
mysqld-relay-bin.000002 mysqld-relay-bin.000004 mysqld-relay-bin.000006
[root@slave mysql]# cat master.info
14
mysql-bin.000010
1235
192.168.3.21
slave
29019853
3307
60
0
[root@slave mysql]# cat relay-log.info
/var/run/mysqld/mysqld-relay-bin.000013
235
mysql-bin.000010
1235
3
50703
Resolve solution:
[root@slave ~]# service mysqld stop
[root@slave mysql]# rm -fr master.info
[root@slave mysql]# rm -fr relay-log.info
[root@slave ~]# grep skip-slave-start /etc/my.cnf
skip-slave-start
[root@slave ~]# service mysqld start
[root@master ~]# mysql -uroot -p
mysql> show master status;
+------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000011 | 98 | | |
+------------------+----------+--------------+------------------+
[root@slave ~]# mysql -uroot -p
mysql> change master to
master_log_file='mysql-bin.000011',
master_log_pos=98,
master_host='192.168.3.21',
master_port=3307,
master_user='slave',
master_password='12345678';
Query OK, 0 rows affected (0.02 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: 192.168.3.21
Master_User: slave
Master_Port: 3307
Connect_Retry: 60
Master_Log_File: mysql-bin.000011
Read_Master_Log_Pos: 98
Relay_Log_File: mysqld-relay-bin.000002
Relay_Log_Pos: 235
Relay_Master_Log_File: mysql-bin.000011
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 98
Relay_Log_Space: 235
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0
1 row in set (0.00 sec)
转载于:https://blog.51cto.com/2904295/552273
mysql replicate error相关推荐
- 转: windows系统下mysql出现Error 1045(28000) Access Denied for user 'root'@'localhost'
windows系统下mysql出现Error 1045(28000) Access Denied for user 'root'@'localhost' 转自 http://zxy5241.space ...
- MySQL显示ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘localhost‘ (10061)解决方法
MySQL显示ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)解决方法 参考文章: (1)MySQL显示 ...
- 【MySQL】ERROR 1045 (28000): Access denied for user的解决方法
[MySQL]ERROR 1045 (28000): Access denied for user的解决方法 参考文章: (1)[MySQL]ERROR 1045 (28000): Access de ...
- MAC电脑:安装mysql报ERROR 1045 (28000)Access denied
问题:安装mysql时报ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 1.my ...
- 在ubuntu上mysql出现ERROR 1045(28000):Access denied for user ‘young‘@’localhost‘(using password:NO)...
刚在ubuntu12.04.02上安装了mysql.在终端输入mysql后,出现如下错误: 在ubuntu上mysql出现ERROR 1045(28000):Access denied for use ...
- mysql 1030 error:Got error 28 from storage engine
最近生产应用连不上生产环境数据库,使用命令行连上去之后,执行命令出现1030 error. 故Google之,解决方案如下. mysql 1030 error 是因为没有足够的空间,清理磁盘空间即可恢 ...
- ldd /usr/bin/mysql_mysql客户端登录时报mysql: relocation error错误
在安装了xtrabackup后,再用下列命令登录时报下列错误 [root@localhost ~]# mysql -u root -p mysql: relocation error: mysql: ...
- MySQL Replication Error 处理一例
故障现象 MySQL slave status详情 mysql> show slave status\G *************************** 1. row ********* ...
- mysql error report,ECSHOP网店系统提示MYSQL SERVER ERROR REPORT的解决方法
cshop(V 2.7.2)网站访问突然提示:"MySQL server error report MySQL server error report:Array ( [0] => A ...
最新文章
- 如果你的云服务商倒闭该怎么办?
- POM.xml 标签详解
- echarts柱状图 与轴不重叠_用Echarts做堆积的柱状图,当横轴为“time”类型时,都是从0开始显示,而不是叠加,为什么会这样?...
- for(;;)是什么,for(;;)的作用
- 怎样将employee 加到Territory里
- SimpleDateFormat类 java 1614697530
- 离散余弦变换原理及实现【转载】
- 2019年第一批重点作品版权保护预警名单公布 都是贺岁档
- 一起看2018阿里技术参考图册(算法篇)
- 修改sqlserver编码为utf8_修改Matlab默认编码格式为UTF-8
- DORADO实现动态拼装查询条件
- json转换为对象 java对象数组对象_将json数组转换为java列表对象
- studio one 3 机架声道设置_「声卡跳线」IXI Mega M8 声卡电脑/手机直播机架跳线(图文教程)...
- python 导入离线地图_PyQGIS开发 -- 离线地图
- 解决idea谷歌翻译插件不可用
- led背光源工作的条件及结构
- linux下用命令修改图片像素
- 对话姜老师,DBA的职场之路
- 〖Python APP 自动化测试实战篇⑥〗- 实战 - appium 定位手机元素之常用的元素定位方法
- 跨平台大行其道 CocoaChina 2012年9月开发者大会落幕
热门文章
- 面试--输入一堆随机数(0-1000),这里面会有重复的数字,把他们去除掉。然后由大到小排列。
- htonl(), ntohl(), htons(), ntohs() 函数
- MMKV集成与原理,先收藏了
- 已成功拿下字节、腾讯、脉脉offer,算法太TM重要了
- android md 控件,Android基本UI控件.md
- Spring入门与常用配置
- php 常用正则运算
- ECharts 点击非图表区域的点击事件不触发问题
- Objective-C语言的动态性
- Elasticsearch集群知识笔记