根据创建者导出具有不同访问权限的MYSQL函数

发布于 2024-09-25 20:57:33 字数 372 浏览 7 评论 0原文

从 phpMyAdmin 中,我导出了分配给特定数据库的用户使用的函数/过程,并且有 3 个函数没有导出,因为它们是由“超级管理员”创建的。

我能够在其中看到这些函数

localhost > database_name -> Structure -> Routines

,但是我无法修改它们的结构或导出它们。

问题的发生是因为这 3 个函数是由超级用户创建的。从超级用户帐户导出时,所有内容都已正确导出。

我的问题是:作为一个过程,我如何确保将来不会再次发生这种情况 - 有人意外地将其创建为超级管理员(并且该网站将继续正常工作),但是当我们尝试导出它时,函数不会被导出(并且新站点将停止工作)。

From phpMyAdmin, I was exporting the functions/procedures used by the user assigned to a particular database and 3 functions didnt get exported because they were created by the 'superadmin'.

I was able to see these functions within

localhost > database_name -> Structure -> Routines

BUT, I was not able to modify their structure or export them.

The problem was happening because these 3 functions were created by the superuser. When exporting from the superuser account, everything got exported properly.

My question is: as a process, how can I ensure that this doesn't happen again in the future - that someone accidentally creates it as a superadmin (and the site would continue to work fine), but when we try exporting it, the function doesnt get exported (and the new site would stop working).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

伊面 2024-10-02 20:57:34

限制对超级用户帐户的访问将是我要采取的第一步。通过限制超级用户访问,您可以保证没有人再犯同样的错误。是否有人需要以超级用户身份在数据库中工作?

Restricting access to the superuser account would be the first step I would take. By restricting superuser access you guarantee that no one makes that mistake again. Is there a reason someone would need to be in the database working as a superuser?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文