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

 

posted @ 2012-11-12 20:11  牛棚琐思  阅读(3397)  评论(0编辑  收藏  举报

牛棚锁思 | 改变习惯的一点点