2

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

Sabio
  • 21
  • 1
  • 3
  • 1
    Sounds like the security finding might be due to database users having been granted `CREATE ROUTINE` and/or `ALTER ROUTINE` privilege. This question might better be asked on **dba.stackexchange.com**. – spencer7593 Aug 08 '14 at 20:06

2 Answers2

3

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)

Lfa
  • 1,069
  • 2
  • 10
  • 23
2

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

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

duffymo
  • 305,152
  • 44
  • 369
  • 561