As of MySQL 4.0.2, the safe-show-database option is deprecated and doesn't do anything (it is enabled by default), because there is now a SHOW DATABASES priviledge that can be used to control access to database names on a per-account basis.
On other hand, even if SHOW DATABASES is set to "N" for a site admin user he can still list all the databases on the server.
This is because after mysql is upgraded to MySQL-4.0.x the columns "Create_tmp_table_priv" and "Lock_tables_priv" by default are set to "Y" for all site admin users.
Here are the steps to fix the issue:
1. Initially run the command,
This is because after MySQL upgrade for some reason the user table does not get updated and it does not show all the new columns like "Create_tmp_table_priv" and "Lock_tables_priv".
2. Login to mysql as root
3. Run the following commands:
mysql> update user set Create_tmp_table_priv= "N" where user != "root";
mysql> update user set Lock_tables_priv= "N" where user != "root";
4. Restart mysql service.