gpt4 book ai didi

mysql - 从定义者帐户执行一个 mysql 存储过程,没有执行权限

转载 作者:行者123 更新时间:2023-11-29 02:21:13 25 4
gpt4 key购买 nike

我在我的 mariaDB 数据库中创建了一个存储过程。定义者是一个受限用户,没有 EXECUTE 权限(在数据库、表和过程级别)。

但我可以从该帐户成功执行此过程。

这是正常行为吗,定义者即使没有 EXECUTE 权限也可以执行该过程?

最佳答案

这是正常行为。来自manual :

The EXECUTE privilege is required to execute stored routines. However, this privilege is granted automatically to the creator of a routine if necessary (and dropped from the creator when the routine is dropped). Also, the default SQL SECURITY characteristic for a routine is DEFINER, which enables users who have access to the database with which the routine is associated to execute the routine.

关于mysql - 从定义者帐户执行一个 mysql 存储过程,没有执行权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31605253/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com