MySQL复制ERROR 1794 (HY000): Slave is not configured or failed to initialize properly.
Posted 数据库技术和故事
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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.
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 即可!
以上是关于MySQL复制ERROR 1794 (HY000): Slave is not configured or failed to initialize properly.的主要内容,如果未能解决你的问题,请参考以下文章
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 lea
MySQL5.6 主从复制 ERROR 1776 (HY000): Parameters MASTER_LOG_FILE
MySQL报错ERROR1872(HY000):Slave failed to initialize
处理一则MySQL Slave环境出现ERROR 1201 (HY000): Could not initialize master info structure的案例。
MySQL错误:ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES