• 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
    [root@mysql01 data]# usr/local/mysql/bin/mysqld restart
    Shutting down MySQL..                                      [  OK  ]
    Starting MySQL..                                           [  OK  ]

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

  • 相关阅读:
    安装包安装服务,点修复出现的错误”Error 1001:指定的服务已存在“ 解决办法
    C# tostring 格式化输出 (转)
    WPF button 如何区分click和doubleclick
    二叉树算法
    关于OA流程相关数据表的设计
    没事干写写流程审批数据库的设计
    挂载system.img并提取文件
    使Checkbox禁用,不可选
    Android显示网速的另一种方法
    C语言 解压华为固件
  • 原文地址:https://www.cnblogs.com/DataArt/p/10260970.html
Copyright © 2020-2023  润新知