mysql主从同步失败的解决方法
1.首先,在从服务器中停止复制线程;
MariaDB [(none)]> STOP SLAVE;
Query OK, 0 rows affected (17.48 sec)
2.从服务器复制线程停止后,在从服务器上重置SLAVE信息;
MariaDB [(none)]> RESET SLAVE;
Query OK, 0 rows affected (0.01 sec)
3.SLAVE信息重置后,重新配置正确的CHANGE MASTER TO信息;
MariaDB [(none)]> CHANGE MASTER TO
MASTER_HOST='192.168.73.110',MASTER_USER='repluser',MASTER_PASSWORD='centos',MASTER_PORT=3306,MASTER_LOG_FILE='mysql-
bin.000003',MASTER_LOG_POS=245;
Query OK, 0 rows affected (0.01 sec)
4.最后,CHANGE MASTER TO信息配置好后,重新启动线程即可;
MariaDB [(none)]> START SLAVE;
Query OK, 0 rows affected (0.00 sec)
辰迅云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读: mysql怎么查询数据库连接数量