MYSQL導入csv類型的數據出現The MySQL server is running with the --secure-file-priv option


今天嘗試使用 into outfile導出數據的時候出現錯誤:

The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

上網查了一下,應該是mysql設置的權限,可以使用

show variables like '%secure%';查看 secure-file-priv 當前的值是什么

 上面的這個“/root/”是我修改之后的,剛開始報錯的時候查看這個值是“NULL”。

我們需要在配置文件中修改這個值

然后再重啟系統就可以了。

 


免責聲明!

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



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