环境
CentOS Linux release 7.7.1908 (Core)
拉取Mysql8.0 镜像
docker pull mysql:8.0.18
创建挂载目录
mkdir -p /home/app/mysql/conf
mkdir -p /home/app/mysql/data
mkdir -p /home/app/mysql/logs
放入my.cnf
vi /home/app/mysql/conf/my.cnf
把下面配置复制到文件中
# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have r