加入收藏 | 设为首页 | 会员中心 | 我要投稿 应用网_镇江站长网 (https://www.0511zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MySql教程 > 正文

into outfile报错的难题

发布时间:2022-06-28 05:27:50 所属栏目:MySql教程 来源:互联网
导读:明明有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 affecte
  明明有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,所以一定要注意。

(编辑:应用网_镇江站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!