mysql导出数据无权限的问题
环境为rhel6,在root下操作:
SQL code
select * into outfile '/root/aaa/tbl.txt'
fields terminated by ',' optionally enclosed by '"'
lines terminated by '\n'
from tbl;
显示错误为:
ERROR 1 (HY000) at line 1: Can't create/write to file '/root/aaa/tbl.txt' (Errcode: 13)
但是导入到/tmp目录是成功的。
尝试将aaa目录的权限改为1777,但仍然无效。
不会只能是mysql安装用户下的目录或/tmp吧?
------解决方案--------------------
/root目录其他用户有x的权限吗 没权限是进不去的