phpMyAdmin is the most popular web application for managing MySQL database servers. Many users also used it to access databases of production environments. In that case, security is a major concern. Providing root account access of phpMyAdmin can be harmful to your database server. So we recommend using non-root accounts for acceding databases.
This tutorial will help you to completely disable root login in phpMyAdmin.
Disable root Login in phpMyAdmin
First of all, find the phpMyAdmin directory location as per your installation. Generally, it is installed under
/usr/share/phpmyadmin directory. In some cases, the configuration file may be located under the
Switch to the phpMyAdmin directory:
config.in.php, which is the main configuration file for phpMyAdmin.
and add/update following parameters:
$cfg['Servers'][$i]['auth_type'] = '
cookie'; $cfg['Servers'][$i]['AllowRoot'] = FALSE;
Some of the default installations may not have the config.inc.php. In that case, you can make a copy of the config.sample.inc.php file at the same location.
cp config.sample.inc.php config.inc.php
Open phpMyAdmin in a web browser and try login with the root account. You will see “Access denied!” error message on screen. It means the changes work correctly.