MYSQL導入數據出現ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement


MYSQL導入數據出現The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

方法一:

這個原因其實很簡單,是因為在安裝MySQL的時候限制了導入與導出的目錄權限

只能在規定的目錄下才能導入

我們需要通過下面命令查看 secure-file-priv 當前的值是什么

show variables like '%secure%';

 

 

我們可以看到value的值為/var/lib/mysql-files/

那么我們把導入的路徑改為上面的值就可以了

方法二:

  如果覺得這樣太麻煩,那么我們就需要改配置文件,

可以參考:http://blog.csdn.net/lyhvoyage/article/details/50521440

我改完之后覺得,原來的位置挺好,以后可能有需要再弄吧。

---恢復內容結束---


免責聲明!

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



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