标签 select 下的文章

select into outfile权限设置

线上库新建账号以后给select权限,但是 select into outfile导出查询结果的时候直接报错:

select * from user into outfile '/tmp/user.csv';  
ERROR 1045 (28000): Access denied for user cha@'192.168.%' (using password: YES)

赋予file权限

(root@localhost) [mysql]>grant file on test.* to cha@'192.168.%';  
ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES  --提示该权限是global,必须使用*.* 方式
(root@localhost) [mysql]>grant file on *.* to cha@'192.168.%'; 
Query OK, 0 rows affected (0.00 sec) 

再次执行查询导出成功:

select * from user into outfile '/tmp/user.csv';  
Query OK, 300 rows affected (0.01 sec)  

MySQL报错“noAccessToProcedureBodies=true”解决方法

  MySQL执行存储过程的时候,报错“ User does not have access to metadata required to determine stored procedure parameter types. If rights can not be granted, configure connection with "noAccessToProcedureBodies=true" to have driver generate parameters that represent INOUT strings irregardless of actual parameter types.”

---阅读剩余部分---

最新

分类

归档

评论

其它