【Mysql】MySQL 用户执行存储过程的权限

问题

运行存储过程报错:

原因

查询资料:

1305错误,由于当前用户没用权限,对用户进行授权后可以执行。

解决

MySQL创建存储过程/函数需要的权限

alter routine---修改与删除存储过程/函数

create routine--创建存储过程/函数

execute--调用存储过程/函数

其他

权限 说明
all  
alter  
alter routine 使用alter procedure 和drop procedure
create  
create routine 使用create  procedure
create temporary tables 使用create temporary table
create  user  
create view  
delete  
drop  
execute 使用call和存储过程
file 使用select into outfile  和load data infile
grant option 可以使用grant和revoke
index 可以使用create index 和drop index
insert  
lock tables 锁表
process 使用show full processlist
reload    使用flush
replication client 服务器位置访问
replocation slave 由复制从属使用
select  
show databases  
show view  
shutdown 使用mysqladmin shutdown 来关闭mysql
super  
update  
usage 无访问权限

(此表转载:https://www.cnblogs.com/fslnet/p/3143344.html

猜你喜欢

转载自blog.csdn.net/heni6560/article/details/83542689
今日推荐