Ok this is more of a \'Keeping my house in order\' question.
PHPmyAdmin is installed but it has a bunch of databases installed as default.
•cdcol (1) •infor
If you are trying to do this via an automated script or command line:
Create a hidedb.sql
file and add the following content:
USE 'phpmyadmin';
UPDATE `pma__userconfig` SET `config_data` = '{\"Server\\/hide_db\":\"(information_schema|performance_schema|mysql|phpmyadmin)\",\"collation_connection\":\"utf8mb4_unicode_ci\"}' WHERE `pma__userconfig`.`username` = 'phpmyadmin';
The Command line (or in a script - SAFER WAY):
$ sudo mysql -u root -p < hidedb.sql
Of course you'll have to enter your sudo and then your mysql root database password.
If you're doing this in an automated script that you only can run as root:
NOTE: THIS IS NOT A GOOD IDEA! It exposes your root password!
DB_PWD="my_password"
mysql -u root -p"$DB_PWD" < hidedb.sql