+91 88 00 563434 [email protected] Blog open-book Knowledge Base

Find Solutions in Our Knowledge Base

PHPMyAdmin shows every database when logging in as a user

You are here:
Sharing is Caring

If phpmyadmin shows all the databases on a server when it should only show the users databases do the following:

First be sure a MySQL root password is set.

Add safe-show-database in the mysqld section of /etc/my.cnf
[mysqld]
safe-show-database

Then restart mysql.

If this does not work do the following:

mysql -u root -p mysql

update `user` set Create_tmp_table_priv = ‘N’, Lock_tables_priv = ‘N’ where user <> ‘root’;

Go back to shell and run mysqladmin reload

If you get an error about a column not found run the following:

mysql_fix_privilege_tables [mysql root password]

then rerun the update command.


Sharing is Caring

Leave a Comment

Table of Contents