docker 启动mysql容器报错
[Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.41-1.el7 started.
2023-04-17 09:41:14+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
command was: mysqld --verbose --help --log-bin-index=/tmp/tmp.QXg3gZVFVb
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!
1、删除存在的 mysql启动配置文件
sudo find / -name my.cnf --查找
rm $(find / -name my.cnf) --删除
2、再来一次
docker run -p 3307:3306 --name mysql-master -v /mydata/mysql-master/log:/var/log/mysql -v /mydata/mysql-master/data:/var/lib/mysql -v /mydata/mysql-master/conf:/etc/mysql --privileged=true -e MYSQL_ROOT_PASSWORD=root -d mysql:5.7
启动成功
文章来源:https://www.toymoban.com/news/detail-505495.html
感谢感谢文章来源地址https://www.toymoban.com/news/detail-505495.html
到了这里,关于docker 启动mysql:5.7报错的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!