mysql 1794_MySQL复制ERROR 1794 (HY000): Slave is not configured or failed to initialize properly.

ERROR 1794 (HY000): Slaveis not configured or failed to initialize properly. You must at leastset --server-id to enable either a master or a slave. Additional error messages can be foundin the MySQL error log.

error log中有类似日志:

2016-05-10 17:21:25 14407 [Warning] InnoDB: Cannot open table mysql/innodb_table_stats from the internal data dictionary of InnoDB though the .frm file for the table exists. See

%5CUsers%5CDELL%5CAppData%5CLocal%5CTemp%5C%W@GJ%24ACOF(TYDYECOKVDYB.pnghttp://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.

2016-05-10 17:21:25 14407 [Warning] InnoDB: Cannot open table mysql/slave_master_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See

%5CUsers%5CDELL%5CAppData%5CLocal%5CTemp%5C%W@GJ%24ACOF(TYDYECOKVDYB.pnghttp://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.

2016-05-10 17:21:25 14407 [Warning] InnoDB: Cannot open table mysql/slave_relay_log_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See

%5CUsers%5CDELL%5CAppData%5CLocal%5CTemp%5C%W@GJ%24ACOF(TYDYECOKVDYB.pnghttp://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.

2016-05-10 17:21:25 14407 [Warning] InnoDB: Cannot open table mysql/slave_worker_info from the internal data dictionary of InnoDB though the .frm file for the table exists. See

%5CUsers%5CDELL%5CAppData%5CLocal%5CTemp%5C%W@GJ%24ACOF(TYDYECOKVDYB.pnghttp://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html for how you can resolve the problem.

解决步骤:

1、drop 备份的 ibd表

1

2

3

4

5

6

use mysql

drop table slave_master_info;

drop table slave_relay_log_info;

drop table slave_worker_info;

drop table innodb_index_stats;

drop table innodb_table_stats;

2、重建

1

2

mysql> source /usr/local/mysql/share/mysql_system_tables.sql

Query OK, 0 rows affected, 1 warning (0.00 sec)

3、重启数据库

1

2

3

[root@mysql01 data]# usr/local/mysql/bin/mysqld restart

Shutting down MySQL..                                      [  OK  ]

Starting MySQL..                                           [  OK  ]

至此,问题解决,登陆数据库,重新 change master to 即可!

随机推荐

AJAX--XMLHttpRequest Object 知识整理

1.创建XMLHttpRequest对象 variable = new XMLHttpRequest() variable = new ActiveXObject('Microsoft.XMLHTTP ...

log4j加日志的方法-转

如何使用log4j记录日志第一步:在工程中加入log4j所使用的jar文件1:项目 >  属性 :弹出项目的属性窗口2:Java构建路径>?库>?添加外部JAR:弹出选择JAR的窗口 ...

catalan---卡特兰数(小结)

(关于卡特兰数的详细介绍)http://baike.baidu.com/view/2499752.htm 下面有练习的题目: 经过测试,_int64/long long 最大只能表示到33位,超过这个 ...

Class.getResource和ClassLoader.getResource的区别分析

原文:http://swiftlet.net/archives/868 在Java中获取资源的时候,经常用到Class.getResource和ClassLoader.getResource,本文给大 ...

CarbonData-2:core

package Core是carbondata的核心代码. 照例,先看Test类.CarbonPropertiesValidationTest

ICSE 2018 论文

仅简单分析自己感兴趣的论文. 9.6 Million Links in Source Code Comments: Purpose, Evolution, and Decay 分析了 source c ...

Mysql Window 解压版卸载

windows如何彻底卸载mysql 如何彻底删除mysql 1.首先在windows服务中将mysql服务删掉,使用命令 sc delete mysql 2.在控制面板中卸载掉mysql. 3.清理 ...

安装Django(1)

安装Django 注意:因为这是web项目将来要部署在Linux上,所以使用centos/ubuntu:因为Python3是将来的趋势,所以使用Python3做为开发语言.本人使用的开发模式操作系统: ...

Git 查看提交历史(分布式版本控制系统)

1.查看提交历史 在提交了若干更新,又或者克隆了某个项目之后,你也许想回顾下提交历史.完成这个任务最简单而又有效的工具是 git log 命令. $ git log commit ca82a6dff8 ...

python数据类型整理

Python中常见的数据结构可以统称为容器(container).序列(如列表和元组).映射(如字典)以及集合(set)是三类主要的容器. 一.序列(列表.元组和字符串) 序列中的每个元素都有自己的编 ...

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值