且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何授予用户执行特定存储过程的权限

更新时间:2022-01-17 22:32:47

是的...如果您没有直接或间接地授予用户mysql.proc表的SELECT特权,则此方法可以按预期工作,例如使用GRANT SELECT ON *.* TO ...

Yes... this works as expected if you don't grant the user the SELECT privilege on the mysql.proc table, either directly or indirectly, such as with GRANT SELECT ON *.* TO ...

在没有此表的SELECT权限的情况下,用户只能看到具有其他权限(例如EXECUTE)的存储过程和存储函数.

Without SELECT permission on this table, a user can only see the existence of stored procedures and stored functions where they have other permissions, like EXECUTE.

在后台,mysql.proc上缺少SELECT还会阻止用户通过information_schema.routines伪表查看他们无权访问的过程.

Under the hood, the lack of SELECT on mysql.proc also prevents the user from seeing the procedures they don't have access to via the information_schema.routines pseudo-table.

您不需要GRANT SELECT ON mysql.proc即可使用户执行过程或功能...如果您这样做,则那个似乎是个问题.

You shouldn't need to GRANT SELECT ON mysql.proc to enable the user to execute procedures or functions... and if you do, then that seems like the question.