解決MySQL下把結果導出到文件權限不足問題


      解決MySQL下把結果導出到文件權限不足問題

select ... into outfile '..' 權限問題

在MySQL下把結果導出到文件,總是權限不足。

mysql> select * into outfile 'e:/mysql/i0812.txt' fields terminated by '|' lines
terminated by '\r\n' from samtest;
ERROR 1 (HY000): Can't create/write to file 'e:\mysql\i0812.txt' (Errcode: 2)

解決方法,賦權:

mysql> grant file on *.* to root@localhost;

 


免責聲明!

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



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