本文主要是介绍docker mysql8-Failed to access directory for --secure-file-priv,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1.在配置文件my.cnf下增加如下
secure-file-priv= /var/lib/mysql
2.将此文件夹映射出来即可
-v /usr/local/mysql3308/mysql/mysql-files:/var/lib/mysql-files
docker run -p 3308:3306 --privileged=true --name mysql3308 -v /usr/local/mysql3308/mysql:/etc/mysql -v /usr/local/mysql3308/logs:/logs -v /usr/local/mysql3308/data:/var/lib/mysql -v /usr/local/mysql3308/mysql/mysql-files:/var/lib/mysql-files -e MYSQL_ROOT_PASSWORD=root12 -d mysql:8.0.19
这篇关于docker mysql8-Failed to access directory for --secure-file-priv的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!