在连接远程主机后键入依次以下命令:
1、docker search mysql 查找mysql镜像
2、docker pull mysql 把mysql8 镜像拉取到本地
3、在linux主机/root目录下创建conf文件夹目录,并且在这个目录里面创建master.conf跟slave.cnf文件
master文件内容:
[mysqld]
#pid-file = /var/run/mysqld/mysqld.pid
#socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
symbolic-links=0
character-set-server = utf8
#skip-networking
innodb_print_all_deadlocks = 1
max_connections = 2000
max_connect_errors = 6000
open_files_limit = 65535
table_open_cache = 128
max_allowed_packet = 4M
binlog_cache_size = 1M
max_heap_table_size = 8M
tmp_table_size = 16M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
sort_buffer_size
版权声明:本文为JineD原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。