这个问题可以参考这个:https://www.omicsclass.com/article/2019
mkdir mysql
cd mysql
mkdir log data conf
#下载mysql 官方镜像
#docker pull mysql:5.7
#启动镜像
docker run -p 3399:3306 --name mysql_pasa \
-v $PWD/log:/var/log/mysql \
-v $PWD/data:/var/lib/mysql \
-v $PWD/conf:/etc/mysql \
-e MYSQL_ROOT_PASSWORD=123456 \
-d mysql:5.7
老师,我按照上面的步骤操作mysql_pasa启动后1秒就自动退出了,查看docker logs 显示:
2023-04-24 13:44:46+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.42-1.el7 started.
2023-04-24 13:44:46+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.TNVtIp74qF
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!
请问老师这种情况该怎么解决?