Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
用户应该只执行函数和过程。出于安全原因,我授予EXECUTE该用户并撤销同一用户的其他权限。
EXECUTE
如何检查该用户是否只有EXECUTE存储功能的权限?
SHOW GRANTS FOR '<user>'@'<host>'
显示用户的授权。您可以检查用户的授权。
SELECT * FROM mysql.procs_priv WHERE Proc_priv='Execute' AND Routine_type='PROCEDURE' AND Routine_name='<routine_name>' AND User='<user>' Db='<db_name>' AND Host='<host>';
Db 和 Host 可能不是必需的