GICT knowledge base
PHPMyAdmin shows every database when logging in as a user
Published
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.
Related guides
Check MariaDB Versions and Compatibility on Shared Hosting
Check your actual MariaDB/MySQL server version, maintenance coverage and application requirements before requesting a shared-hosting upgrade or move.
MySQLHow to Monitor MySQL Database Server Performance
Learn how to monitor MySQL performance with 4 essential Linux command-line tools.
MySQLHow to secure MySQL connections with SSL on Ubuntu
MySQL allows remote connections and we must protect data transfer happeneing between servers with SSL. Follow this tutorial to learn how.
MySQLHow to set up High Availability WordPress with HyperDB
HyperDB is a drop-in plugin that allows you to set up High Availability WordPress site that can work with multiple database servers at once.
