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