When trying to access PhpMyadmin from CPanel/WHM if you are getting the error : "
Existing configuration file (./config.inc.php) is not readable"
This means that the ownership of the file “config.inc.php” was not correct and you can easily fix this by following the bellow given steps :
- Login to the server as root user :
root@server[#] cd /usr/local/cpanel/base/3rdparty/phpMyAdmin
- Then check the ownership of the file : config.inc.php
root@server[/usr/local/cpanel/base/3rdparty/phpMyAdmin]# ls -l config.inc.php
-rw-r—– 1 root root 2409 Nov 12 11:57 config.inc.php
- The ownership should be :
-rw-r—– 1 root cpanelphpmyadmin 2409 Nov 12 11:57 config.inc.php
- Which you can easily set by running the below command :
root@server[/usr/local/cpanel/base/3rdparty/phpMyAdmin]# chown root:cpanelphpmyadmin config.inc.php
Or
root@server[/usr/local/cpanel/base/3rdparty/phpMyAdmin]# chown root.cpanelphpmyadmin config.inc.php
- Now when you run the command ls -l config.inc.php it should show the output as :
-
rw-r—– 1 root cpanelphpmyadmin 2409 Nov 12 11:57 config.inc.php
- Finally restart CPanel service on the server
root@server[#] /etc/init.d/cpanel restart
That's it
--