安装mysql8.0
1、下载镜像
docker pull mysql:8.0
2、创建配置文件,配置默认字符
cd /jjds/software/mysql/conf
vi my.cnf
[mysqld]
character-set-server = utf8mb4
collation-server = utf8mb4_general_ci
[mysql]
default-character-set = utf8mb4
[client]
default-character-set = utf8mb4
3、启动mysql
docker run -p 3306:3306 --privileged=true --name mysql -v /jjds/software/mysql/log:/var/log/mysql -v /jjds/software/mysql/data:/var/lib/mysql -v /jjds/software/mysql/conf:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=36646664.aa -d mysql:8.0