时间:2021-07-01 10:21:17 帮助过:9人阅读
mysql> reset master;
再次执行导入
[root@server02 ctchat]# mysql -uroot -p111111 < 1.sql mysql: [Warning] Using a password on the command line interface can be insecure.
可以查看gtid信息(非必须)
mysql> SELECT * FROM mysql.gtid_executed; +--------------------------------------+----------------+--------------+ | source_uuid | interval_start | interval_end | +--------------------------------------+----------------+--------------+ | 51b51b0d-2626-11ea-88f0-000c2982a1b2 | 1 | 8 | | bbaf780c-eb3a-11e9-94eb-6c92bf7e28c6 | 3 | 12881 | | fa2f988c-eb3c-11e9-942f-6c92bf7dac7c | 1 | 33188709 | +--------------------------------------+----------------+--------------+ 3 rows in set (0.00 sec)
mysql> create user ‘slave1‘@‘%‘ identified by ‘123456‘; mysql> grant replication slave on *.* to ‘slave1‘@‘%‘; mysql> flush privileges;
mysql> CHANGE MASTER TO MASTER_HOST = ‘10.4.7.3‘, MASTER_PORT = 1342, MASTER_USER = ‘slave1‘, MASTER_PASSWORD = ‘123456‘, MASTER_AUTO_POSITION = 1 for channel ‘db01‘; mysql> start slave; mysql> show slave status\G;
Mysql主从环境配置
标签:res set sql ide hose 需要 erro roo pos