Install phpMyAdmin - database tasks via web-gui


his tutorial works for CentOS only. For your specific OS tutorial use the tags or serach function in the sidebar area.


When it comes to manage your database tables outside terminal there comes a handy web-based tool : phpMyAdmin.

This version comes from rpmforge repository. If you don't have rpmforge repo installed visit earlier tutorial

System update using 'yum'.

Installng phpMyAdmin.

$ yum install phpMyAdmin

Make a link into your www dir
$ ln -s /usr/share/phpMyAdmin/ /var/www/html/phpmyadmin

Remeber our Apache installation (single-user mode) runs under specific user? I.e. 'jtkirk'. We have to change the owner of phpmyadmin directory

chown -R jtkirk:jtkirk /var/www/html/phpmyadmin/



$ nano /etc/httpd/conf.d/phpMyAdmin.conf

After first install the defaults are Allow access to phpmyadmin only from localhost

   Order Deny,Allow
   Deny from All
   Allow from
   Allow from ::1

Allow to phpMyAdmin only from my-home-static-ip


Allow from

Where is your home IP.

Of course when you have dynamic IP at home this won't work because your IP will be changing constantly and you won't be able to login so we need to depend only on built-in authorization.

Save and exit.


Enable mcrypt PHP module

This is an interface to the mcrypt library, which supports a wide variety of block algorithms such as DES, TripleDES, Blowfish (default), 3-WAY, SAFER-SK64, SAFER-SK128, TWOFISH, TEA, RC2 and GOST in CBC, OFB, CFB and ECB cipher modes.

Otherwise you'll get warning:  The mcrypt extension is missing. Please check your PHP configuration.

$ nano /etc/php.d/mcrypt.ini

if you have

; Enable mcrypt extension module

change it to:

; Enable mcrypt extension module

Save and exit.

$ service httpd restart


Access phpMyadmin in a browser


Login with mySQL user/password.