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,表示不允許匯入匯出操作,
當值為具體的檔案夾,表示匯入匯出只能在該目錄下操作,目錄不存在會報錯,
當值沒有具體值時,表示不限制匯入匯出操作的檔案夾,
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/125642.html
標籤:MySQL
