测试主从5.7.35滚动升级到8.0.28,升级完成后,启动复制进程slave,出现warning,如下:
root@localhost [test]>stop slave; Query OK, 0 rows affected, 1 warning (0.00 sec) root@localhost [test]>show warnings; +---------+------+-----------------------------------------------------------------------------------------------------+ | Level | Code | Message | +---------+------+-----------------------------------------------------------------------------------------------------+ | Warning | 1287 | 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead | +---------+------+-----------------------------------------------------------------------------------------------------+
通过以上warning信息提示复制命令 slave被 REPLICA命令取代,下面演示replica启动复制进程
root@localhost [test]>stop replica; Query OK, 0 rows affected (0.01 sec) root@localhost [test]>start replica; Query OK, 0 rows affected (0.01 sec)
疑问:主库创建新表之后或者插入新的数据后,从库要退出重新登陆或者新开窗口才能发现更新的数据,有知道的大佬帮忙解释下。截图如下:

