首页 > 学院 > 综合知识 > 正文

into outfile报错的难题

2022-07-19 11:53:08
字体:
来源:转载
供稿:网友
  明明有select 权限却报错
  mysql> select * from server into outfile '/tmp/tt.txt';
  ERROR 1045 (28000): Access denied for user 'chenliang'@'%' (using password: YES)
 
  百度后需要给file权限
  mysql>  grant file on *.* to chenliang;
  Query OK, 0 rows affected (0.00 sec)
 
  导出成功
  mysql> select * from server into outfile '/tmp/tt.txt';
  Query OK, 27 rows affected (0.00 sec)
 
  这个参数我以前在5.6.24版本都没调整过,可能默认值就是‘’,高版本默认值改成null,所以一定要注意。

(编辑:错新网)

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表