使用docker run命令時(shí)啟動(dòng)? mysql8.0鏡像時(shí)失敗,
報(bào)錯(cuò)信息如下:?
?[ERROR] [MY-010095] [Server] Failed to access directory for --secure-file-priv. Please make sure that directory exists and is accessible by MySQL Server. Supplied value : /var/lib/mysql-files
原因:MYSQL新特性secure_file_priv,對(duì)讀寫(xiě)文件的限制,secure-file-priv參數(shù)是用來(lái)限制LOAD DATA, SELECT … OUTFILE, and LOAD_FILE()傳到哪個(gè)指定目錄的。
解決辦法:
linux:
修改my.cnf 在[mysqld]內(nèi)加入secure_file_priv= MYSQL新特性secure_file_priv對(duì)讀寫(xiě)文件的影響
然后重啟mysql,再查詢secure_file_priv
windows:文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-622963.html
修改my.ini 在[mysqld]內(nèi)加入secure_file_priv=文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-622963.html
到了這里,關(guān)于docker 容器啟動(dòng) mysql8.0失敗的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!