1、
docker rm -f mysql
mkdir -p /root/cloud/mysql/log
mkdir -p /root/cloud/mysql/data
mkdir -p /root/cloud/mysql/conf
cd /root/cloud/mysql/conf/
vi my.cnf
[client]
default_character_set=utf8
[mysqld]
collation_server = utf8_general_ci
character_set_server = utf8
docker run -p 3306:3306 \
--privileged=true \
--name mysql \
-v /root/cloud/mysql/log:/var/log/mysql \
-v /root/cloud/mysql/data:/var/lib/mysql \
-v /root/cloud/mysql/conf:/etc/mysql \
-e MYSQL_ROOT_PASSWORD=root \
-d mysql:5.7
show variables like '%character%';
标签:log,安装,conf,mysql,docker,root,cloud
From: https://www.cnblogs.com/kikyoqiang/p/17029083.html