加入收藏 | 设为首页 | 会员中心 | 我要投稿 PHP编程网 - 黄冈站长网 (http://www.0713zz.com/)- 数据应用、建站、人体识别、智能机器人、语音技术!
当前位置: 首页 > 站长学院 > MySql教程 > 正文

into outfile报错的难题

发布时间:2022-06-28 11:45:55 所属栏目: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,所以一定要注意。

(编辑:PHP编程网 - 黄冈站长网)

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

    热点阅读