Article ID: 2670, created on Oct 29, 2007, last review on Apr 17, 2012

  • Applies to:
  • Pro Control Panel Linux


View Knowledge
Knowledge ID 1887
Product : EnsimPro on Linux(Fedora)
Version : 4.0.2
Topic : Hot Fixes

Upgrading MySQL to 4.x lists all databases when logged in as a normal user.

After Upgrading MySQL to MySQL-4.0.x the mysql users can see all the databases on the server.



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,

mysql_fix_privilege_tables  <mysql_root_passwd>

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.




Related Knowledge

Related Links
Last ModifiedUsageSatisfiedLast Used
11/11/2004 2:04:47 AM482 10/15/2007 11:44:42 PM

4cc899da08664637a8bc437308d3ddd7 3ccb419cf98083f3bb45808fba8dbc7c 6311ae17c1ee52b36e68aaf4ad066387

Email subscription for changes to this article
Save as PDF