1、错误日志

	2022-10-27 15:16:12+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.40-1.el7 started.
	2022-10-27 15:16:12+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
	command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.pK4RuqLbS3
	mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)
	mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
	
	2022-10-27 15:23:18+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.40-1.el7 started.
	2022-10-27 15:23:18+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
	command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.Nj3TyHzBkE
	mysqld: Can't read dir of '/etc/mysql/mysql.conf.d/' (Errcode: 2 - No such file or directory)
	mysqld: [ERROR] Fatal error in defaults handling. Program aborted!


2、解决方案

(1)新建 conf.d文件夹 和 mysql.conf.d文件夹
		drwxr-xr-x. 2 root root   6 10月 27 23:05 conf.d
		drwxr-xr-x. 2 root root   6 10月 27 23:07 mysql.conf.d
		-rw-r--r--. 1 root root 283 10月 27 22:33 my.cnf


(2)运行以下命令
docker run \
--name mysql \
--privileged=true \
-p 3306:3306 \
-v /mydata/mysql/log:/var/log/mysql \
-v /mydata/mysql/data:/var/lib/mysql \
-v /mydata/mysql/conf:/etc/mysql \
-e MYSQL_ROOT_PASSWORD=root \
-d mysql:5.7