修改完配置后重启master
docker restart mysql-master
运行结果
[root@localhost conf]# docker restart mysql-master
mysql-master
进入mysql-master容器
docker exec -it mysql-master /bin/bash
mysql -uroot -proot
运行结果
[root@localhost conf]# docker exec -it mysql-master /bin/bash
root@8b5bc09ae8eb:/# mysql -uroot -proot
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.36-log MySQL Community Server (GPL)
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>