MySQL读写分离从库配置:Slave_IO_Running: No 的解决

问题描述

        进行MySQL读写分离 从库配置时 查看数据库的状态 show slave status; 发现

Slave_IO_Running: No

原因

        从库的数据库虚拟机 克隆了主库的虚拟机 导致了 两台数据库的uuid相同了

解决方案

        1、使用 find / -iname "auto.cnf" 命令查找你数据库的auto.cnf 配置文件。

        2、对这个配置文件的uuid进行更改。(随便改一下就可以 不要跟主库的uuid相同即可)

        3、重新启动mysql (systemctl restart mysqld)

        4、登录mysql,重启slave,再次验证 (show slave status;)

如下:成功

 

posted @ 2022-11-09 08:11  陶然同学  阅读(13)  评论(0编辑  收藏  举报