MySQL問題記錄——導入導出權限設置


MySQL問題記錄——導入導出權限設置

摘要:本文主要記錄了在使用MySQL的過程中導入導出權限設置時遇到的問題以及解決方案。

相關日志

1 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled.
2 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
3 [ERROR] Failed to access directory for --secure-file-priv. Please make sure that directory exists and is accessible by MySQL Server.

解決辦法

在配置文件中加入:

1 [mysqld]
2 # 設置導入導出
3 secure-file-priv=D:\All\MySQL\file

問題說明

配置文件里的 secure-file-priv 參數是用來限制將數據導入導出到指定目錄的:

當值為null,表示不允許導入導出操作。

當值為具體的文件夾,表示導入導出只能在該目錄下操作,目錄不存在會報錯。

當值沒有具體值時,表示不限制導入導出操作的文件夾。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM