英文:
Revoking permission to install plugins?
问题
以下查询是安全审计的一部分,用于识别具有在数据库级别安装/卸载服务器插件访问权限的用户。
SELECT user, host FROM mysql.db WHERE db = 'mysql' and (insert_priv='y') or (delete_priv='y') or (insert_priv='y' and delete_priv='y');
我需要从列出的用户中撤销该权限。是否有特定的权限我可以撤销来完成这个操作?如果有的话,我找不到它。还是我应该直接在mysql.db表中更新insert_priv和delete_priv字段?我不是DBA,但目前我是我们团队中最接近的人。
英文:
The following query was used as part of a security audit to identify users with access to install/uninstall server plugins at the database level.
SELECT user, host FROM mysql.db WHERE db = 'mysql' and (insert_priv='y') or (delete_priv='y') or (insert_priv='y' and delete_priv='y');
I need to revoke that permission from the users that are listed. Is there a specific privilege I revoke to do this? If so, I can't find it. Or would I simply UPDATE the insert_priv and delete_priv fields directly in the mysql.db table? I'm not a DBA but the closest thing we have at the moment.
答案1
得分: 0
你可以在具有对 mysql.plugin
表的 INSERT
权限时安装插件,参见 INSTALL PLUGIN:
要使用
INSTALL PLUGIN
,您必须对mysql.plugin
表具有INSERT
权限。
因此,当您在(内部管理)数据库 mysql
上具有数据库范围的 INSERT
权限时,您可以安装插件。
对于 UNINSTALL PLUGIN
语句也是一样的,请参见 UNINSTALL PLUGIN:
要使用
UNINSTALL PLUGIN
,您必须对mysql.plugin
表具有DELETE
权限。
移除 mysql
数据库的 insert_priv
和 delete_priv
权限,您的 "普通" MySQL 用户账户本来就不应该能够在此数据库中写入。
英文:
You are able to install plugins when you have INSERT
permissions on the mysql.plugin
table, see INSTALL PLUGIN:
> To use INSTALL PLUGIN
, you must have the INSERT
privilege for the mysql.plugin
table.
So when you have database wide INSERT
permissions on the (internal administrative) database mysql
, then you can install plugins.
The same goes for the UNINSTALL PLUGIN
statement, see UNINSTALL PLUGIN
> To use UNINSTALL PLUGIN
, you must have the DELETE
privilege for the mysql.plugin
table.
Remove the insert_priv
and delete_priv
privileges for the mysql
database, your "normal" MySQL user accounts shouldn't be able to write in this database anyway.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论