1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| change master to master_host='192.168.1.171', master_user='repl', master_password='123456', master_log_file='mysql-bin.000003', master_log_pos=157;
[root@slave01 ~]# mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 8.0.28 MySQL Community Server - GPL
Copyright (c) 2000, 2022, 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> change master to -> master_host='192.168.1.171', -> master_user='repl', -> master_password='123456', -> master_log_file='mysql-bin.000003', -> master_log_pos=157; Query OK, 0 rows affected, 8 warnings (0.01 sec)
192.168.1.171为主库IP地址
|