mysql into outfile ERROR : Can't create/write to file



mysql> select uid, app_id from user_ext_0 into outfile '/app/tmp_dat/user_for_login_tmp_ca_0.dat' fields terminated by '|';

报错信息如下:

ERROR 1 (HY000) at line 1: Can't create/write to file '/app/tmp_dat/user_for_login_tmp_ca_0.dat' (Errcode: 13) 错误。


ll 后发现 /app/tmp_dat 目录的没有修改的权限

解决的办法是:

  chmod 775 /app/tmp_dat

你可能感兴趣的:(mysql基础)