网站付费模板,做爰明星视频网站,做新房网站怎么弄,地税局网站怎么做变更一、如果版本不一样请执行以下操作#xff1a;
MySQL 跨版本主从复制时报错#xff1a;ERROR 1794 (HY000): Slave is not configured or failed to initialize properly. 背景#xff1a; zabbix 数据库迁移#xff0c;搭建主从#xff0c;主是5.6.25#xff0c;从是5.…一、如果版本不一样请执行以下操作
MySQL 跨版本主从复制时报错ERROR 1794 (HY000): Slave is not configured or failed to initialize properly. 背景 zabbix 数据库迁移搭建主从主是5.6.25从是5.7.15流式备份应用 redo.log 之后change master 和reset slave 时报出如下错误 mysql CHANGE MASTER TO- MASTER_HOST‘192.168.40.129‘,- MASTER_USER‘repl‘,- MASTER_PASSWORD‘repl_123‘,- MASTER_PORT3306,- MASTER_LOG_FILE‘mysql-bin.000005‘, - MASTER_LOG_POS749,- MASTER_AUTO_POSITION0;
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. 原因从 5.6.25 版本使用 innobackupex 备份在 5.7.15 版本中应用恢复ibd系统表需要重建 解决步骤
1、drop 备份的 ibd表
#登录数据库
mysql -uroot -p
#使用mysql数据库
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;
#重建
source /app/mysql-5.7.25/share/mysql_system_tables.sql
#退出mysql
quit
#重启mysql
/etc/init.d/mysqld restart
或者service mysqld restart
注这里根据自己的mysql路径进行修改即可至此问题解决登陆数据库重新 change master to 即可
二、如果版本一样请执行以下操作
2.1. 编辑/etc/my.cnf
vi /etc/my.cnf2.2. 添加如下2行代码
log-binmysql-bin
server-id22.3. 重启mysql
#重启mysql
/etc/init.d/mysqld restart
或者service mysqld restart
注这里根据自己的mysql路径进行修改即可