如何隐藏mysql存储过程 [英] How to hide mysql stored procedure

查看:94
本文介绍了如何隐藏mysql存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何隐藏MySQL存储过程:与加密一样,SQL Server 存储过程中可用.我尝试向外部用户隐藏存储过程

How to hide MySQL stored procedure: Like with encryption is available in SQL Server Store procedure. I try to hide stored procedure to outside users

推荐答案

SHOW CREATE PROCEDURE 语法:

这个语句是一个 MySQL 扩展.它返回可用于重新创建命名存储过程的确切字符串.类似的声明,SHOW CREATE FUNCTION, 显示有关存储函数的信息(参见 第 13.7.5.10 节,SHOW CREATE FUNCTION 语法").

This statement is a MySQL extension. It returns the exact string that can be used to re-create the named stored procedure. A similar statement, SHOW CREATE FUNCTION, displays information about stored functions (see Section 13.7.5.10, "SHOW CREATE FUNCTION Syntax").

这两个语句都要求您是例程的所有者或具有 SELECT 访问 mysql.proc 表.如果您没有例程本身的权限,则为 Create ProcedureCreate Function 字段显示的值将为 NULL.

Both statements require that you be the owner of the routine or have SELECT access to the mysql.proc table. If you do not have privileges for the routine itself, the value displayed for the Create Procedure or Create Function field will be NULL.

因此,为防止用户查看存储过程的主体,请确保:

Therfore, to prevent users from viewing the body of a stored procedure, ensure that:

  • 他们不是 sproc 的所有者;和

  • they are not the owner of the sproc; and

他们无权访问 mysql.proc 表.

您可以阅读有关MySQL 访问权限系统的更多信息.

You can read more about The MySQL Access Privilege System.

这篇关于如何隐藏mysql存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆