标签:utf8mb4 like nic 容器 ike server-id config run 进入
docker run -d --name mysql -p 3306:3306 --restart=always \
--privileged=tru -e MYSQL_ROOT_PASSWORD=root -v /home/mysql/data/:/var/lib/mysql/ \
-v/home/mysql/config/:/etc/mysql/mysql.conf.d --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci \
--lower_case_table_names=1 mysql:5.7
进入容器修改配置binglog
docker run --name mysql -e MYSQL_ROOT_PASSWORD=root -p 3306:3306 --re start=always -d mysql
docker exec -it mysql /bin/bash
mysql -uroot -p
show variables like 'log_bin';
cd /etc/mysql/mysql.conf.d
cat mysql.conf.d
echo -e '[mysqld]\npid-file\t= /var/run/mysqld/mysqld.pid\nsocket\t= /var/run/mysqld/mysqld.sock\ndatadir\t= /var/lib/mysql\nsymbolic-links=0\nserver-id = 1\nlog-bin = binlog\nlog-bin-index = binlog.index'>mysqld.cnf
标签:utf8mb4 like nic 容器 ike server-id config run 进入
原文地址:https://www.cnblogs.com/hanfan/p/12382332.html