解決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;