该配置文件可以直接放置到目录下,使用docker-compose up -d启动使用。
其中server_id=XX不能重复
在master中执行:
grant replication slave,replication client on *.* to 'user1''%' identified by '1';
flush privileges;
show master status;
记录file和pos,用在slave中的master_log_file和master_log
mysql5.7官方指导手册!原书原版!
This is the MySQL™ Reference Manual. It documents MySQL 5.7 through 5.7.31, as well as NDB Cluster
releases based on version 7.5 of NDB through 5.7.30-ndb-7.5.19, respectively. It may include documentation of
features of MySQL ve