Search code examples
mysqldatabase-permissions

How to stop mySQL users calling "show" functions


How can we prevent the the query "show databases;" or "show tables;" in mysql for any non root user.Is this possible.If so please provide an example or appropriate link...indicating this..

Thanks in advance........


Solution

  • Non-root user sees all databases only if he has global rights (like GRANT something ON *.*). So the solution is to always grant everything ON databasename.* , never global.