How do I restrict access to user-defined functions in MySQL

不羁岁月 提交于 2021-02-08 05:47:18

问题


I am new to MySQL and I ran a Nessus scan on one my Servers and encountered a security finding which has a workaround to Restrict access to user-defined functions. Can someone help me please?

Update

The workaround is to Restrict access to create user-defined functions on the server


回答1:


This should work.

You can read more here http://dev.mysql.com/doc/refman/5.0/en/revoke.html

REVOKE EXECUTE ON FUNCTION mydb.myfunc FROM 'someuser'@'somehost';

However,

In my opinion it's better to grant certain users specific permissions rather making everything accessible and revoking perms from users. (It depends on the application)




回答2:


Learn how to GRANT permission only to specific user ids and hosts:

http://dev.mysql.com/doc/refman/5.1/en/grant.html



来源:https://stackoverflow.com/questions/25211032/how-do-i-restrict-access-to-user-defined-functions-in-mysql

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!