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

ERROR 1794 (HY000): Slave is not configured or failed to initialize properly. You must at least set --server-id to enable either a master or a slave. Additional error messages can be found in 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 http://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 http://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 http://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 http://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

[[email protected] data]# usr/local/mysql/bin/mysqld restart

Shutting down MySQL..                                      [  OK  ]

Starting MySQL..                                           [  OK  ]

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

原文地址:https://www.cnblogs.com/DataArt/p/10260970.html

时间: 2024-10-06 16:28:42

MySQL复制ERROR 1794 (HY000): Slave is not configured or failed to initialize properly.的相关文章

ERROR 1794 (HY000): Slave is not configured or fai

mysql 5.7在从库停止复制进程时出现错误,原因是将复制信息记录表中了. 错误提示: ERROR 1794 (HY000): Slave is not configured or failed to initialize properly. You must at least set --server-id to enable either a master or a slave. Additional error messages can be found in the MySQL err

【故障处理】ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository

今天在使用冷备份文件重做从库时遇到一个报错,值得研究一下. 版本:MySQL5.6.27 一.报错现象 dba:(none)> start slave; ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository 这个时候查看error.log: 2017-07-17 16:19:02 9022 [ERROR] Failed to open the relay log '.

MySQL报错ERROR1872(HY000):Slave failed to initialize

ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository MySQL 5.6修复从库复制时报错 mysql> start slave; ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository 报错原因: 从库已经存在之前的relay log 解决

(MYSQL)ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 方案1. 1.#ps -A|grep mysql 显示类似: 1829 ?        00:00:00 mysqld_safe   1876 ?        00:00:31 mysqld 2.#kill -9 1829 3.#kill -9 1876 4.#/etc/init.d/

远程mysql出现ERROR 1130 (HY000): Host '172.17.42.1' is not allowed to connect to this MySQL server

ERROR 1130: Host ***.***.***.*** is not allowed to connect to this MySQL server 说明所连接的用户帐号没有远程连接的权限,只能在本机(localhost)登录. 需更改 mysql 数据库里的 user表里的 host项 把localhost改称% 具体步骤:登陆到MySQL 首先 use mysql: 按照别人提供的方式update的时候,出现错误. MySQL> update user set host='%' w

MYSQL服务 ERROR 2003 (HY000): Can't connect to MySQL server on "********" 的问题解决

今早来到公司发现昨晚还好好的数据库跑不起来了,这对于本是C语言主编的本人刚刚操作后台来说未免一头雾水. 而且该问题的出现大多是因为一夜突发毫无征兆,或者因为mysql重装.而且网上的题解也有好多答复重装,真是... 具体问题如下: 想必看到这个对于刚刚上手操作mysql的朋友来说都回去查看一下10061这是个什么错误吧. 可恰巧,本人用的是windows系统,网上大多题解都是linux操作环境下的(说到这里,作为程序猿真应该研究一下linux,那也得等现在的项目完毕啊). 像my.cnf配置文件

mysql之ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'解决方法

LAMPP安装完成之后,mysql -u root -p连不上,报这个错误: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' 在mysql的配置文件里,/opt/lampp/etc/my.cnf, 发现了这样的配置: [java] <SPAN style="FONT-SIZE: 24px"># The following

mysql出错ERROR 2003 (HY000): Can&#39;t connect to MySQL server on &#39;localhost&#39; (10061)

其他的贴会教你 1.键盘上win+r 2.输入cmd 3.输入net  start mysql 但是还是没用 你可以试试 1.右击开始菜单 2.点击windows PowerShell(i) 3.输入net  start mysql 4.输入mysql -u**** -p***** 上面的****代表你的账号密码,-u账号,-p密码, 我的账号:root 密码:123456, 那我就输入mysql -uroot -p123456 mysql出错ERROR 2003 (HY000): Can't

MySQL显示ERROR 2003 (HY000): Can&#39;t connect to MySQL server on &#39;localhost&#39; (10061)解决方法

MySQL显示ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)解决方法 2.4K 解决方法: 第一步cd进入mysql的bin目录下: cd C:\Program Files\MySQL\MySQL Server 5.5\bin 输入: mysqld --skip-grant-tables 再新开一个cmd,再进入bin目录: cd C:\Program Files\MySQL\MySQL Serve