How to install phpMYAdmin on CentOS


PhpMyAdmin is a PHP based web application aimed to ease the management of MySQL Databases via an easy to use web interface / gui. In order to setup PhpMyAdmin, you must first have LAMP installed on your server, or another Web Server Stack.

The easiest way to install PhpMyAdmin on a CentOS Linux based server is through Yum. If you're running CentOS 5, 6, or 7, you can run the following command to automatically install PhpMyAdmin;

sudo yum install phpmyadmin

Once Yum finishes installing PhpMyAdmin, we will need to edit the configuration file for PhpMyAdmin, located at /etc/httpd/conf.d/phpMyAdmin.conf . You can use your favorite text editor of choice to edit the configuration file. We will need to change 2~4 lines of coding in the configuration file, which are used to White List your IP Address for PhpMyAdmin connections. The lines will read as follows;

Require ip 127.0.0.1
Allow from 127.0.0.1

You'll want to find each entry for the IP 127.0.0.1 and replace it with the IP of the device that you're going to be connecting to PhpMyAdmin from. You can add multiple lines of coding with different IPs to white list multiple IP Addresses.

Once you've edited and saved your phpMyAdmin.conf file, you'll need to restart or reload Apache for the changes to take effect. You can then visit the following URL to login to PhpMyAdmin; http://YourServerIP/phpmyadmin . You should see a login screen load. You will want to use your root credentials or a MySQL Username and Password to login to this screen. You will then see any databases that the User has permission to access listed within PhpMyAdmin.

Please Note: If you receive an error stating that you do not have a repository containing PhpMyAdmin, you may need to add the Epel Repository to your server. You can find the Epel Repositories here: http://dl.fedoraproject.org/pub/epel/

You can also manually install PhpMyAdmin on any Linux or Windows based server, as long as you have the required prerequisite software installed. To do this, you'll first want to download a copy of the latest PhpMyAdmin release from https://www.phpmyadmin.net/downloads/

Once you have the PhpMyAdmin archive downloaded, you'll want to extract it and upload the files to your local server via an FTP client such as FileZilla. Alternatively, you can also upload the entire archive, prior to extraction, and then extract the archive once it is on the server. You will want to place the files from the archive in the location that you wish to access PhpMyAdmin from.

For example - if you Upload / Extract the archive into your domain's default directory, you would then access PhpMyAdmin via the URL http://www.yourdomainname.com/PhpMyAdmin

You should be prompted with a login page when visiting the URL. You will want to use your root credentials or a MySQL Username and Password to login to this screen. You will then see any databases that the User has permission to access listed within PhpMyAdmin.

Posted in
Last update:
2016-06-29 14:18
Average rating:0 (0 Votes)