请知悉:本文最近一次更新为 3年 前,文中内容可能已经过时。

呐,最近由于数据库从库VPS的IP变更,导致从库启动后提示:“could not initailize master info structure”。

数据库的模式是主从模式。遇到这种情况如何处理呢?搜了下,找到了方案:

MySQL命令行下执行:

RESET SLAVE;

然后执行指令重新指定主库:

CHANGE MASTER TO MASTER_HOST='10.1.100.1', MASTER_USER='slave_user', MASTER_PASSWORD='slave_password', MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=451228;

执行指令启动从库同步:

START SLAVE;

参考资料

Error: “could not initailize master info structure” while doing Master Slave Replication in MySQL


如您从本文得到了有价值的信息或帮助,请考虑扫描文末二维码捐赠和鼓励。

尊重他人劳动成果。转载请务必附上原文链接,我将感激不尽。


与《MySQL could not initailize master info structure 解决方案》相关的博文:


留言

avatar
😀
😀😁😂😅😭🤭😋😘🤔😰😱🤪💪👍👎🤝🌹👌