mysql5.7 迁移以及从库提高为主库
发布时间:2022-07-04 13:24 所属栏目:115 来源:互联网
导读:CHANGE MASTER TO MASTER_HOST=10.10.30.34, MASTER_PORT=3306, MASTER_USER=slave, MASTER_PASSWORD=slave, MASTER_LOG_FILE=mysql-bin.000148, MASTER_LOG_POS=154; 从数据库变为主库 stop slave; reset slave; reset master; 从库变为刚才的主库(由从库
CHANGE MASTER TO MASTER_HOST='10.10.30.34', MASTER_PORT=3306, MASTER_USER='slave', MASTER_PASSWORD='slave', MASTER_LOG_FILE='mysql-bin.000148', MASTER_LOG_POS=154; 从数据库变为主库 stop slave; reset slave; reset master; 从库变为刚才的主库(由从库变为主库的数据库) vim /etc/my.cnf log-bin=mysql-bin #并重启数据库,主库开启binlog日志 中间报错: 1.IO进程一直处于connnecting中 slave 用户的密码写错 2.show slave status;报错 Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file' 解决办法: 主库:flush logs; 从库: stop slave; CHANGE MASTER TO MASTER_LOG_FILE='mysqld-bin.000011',MASTER_LOG_POS=106; start slave; (编辑:ASP站长网) |
相关内容
网友评论
推荐文章
热点阅读