明明有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';
ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
--这次错误不一样了,这个错误是一个参数导致的
配置文件加入后重启
secure_file_priv=''
导出成功
mysql> select * from server into outfile '/tmp/tt.txt';
Query OK, 27 rows affected (0.00 sec)
这个参数我以前在5.6.24版本都没调整过,可能默认值就是‘’,高版本默认值改成null,所以一定要注意
文章标题:【Mysql】intooutfile报错的问题
当前地址:https://www.cdcxhl.com/article42/gjijec.html
成都网站建设公司_创新互联,为您提供电子商务、定制网站、手机网站建设、软件开发、定制开发、网页设计公司
广告
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源:
创新互联