Install and Configure phpMyAdmin on CentOS

phpMyAdmin is a free and open source tool written in PHP intended to handle the administration of MySQL or MariaDB with the use of a web browser. It can perform various tasks such as creating, modifying or deleting databases, tables, fields or rows; executing SQL statements; or managing users and permissions.

  • Web interface
  • MySQL and MariaDB database management
  • Import data from CSV and SQL
  • Export data to various formats: CSV, SQL, XML, PDF (via the TCPDF library), ISO/IEC 26300 - OpenDocument Text and Spreadsheet, Word, Excel, LaTeX and others
  • Administering multiple servers
  • Creating PDF graphics of the database layout
  • Creating complex queries using Query-by-Example (QBE)
  • Searching globally in a database or a subset of it
  • Transforming stored data into any format using a set of predefined functions, like displaying BLOB-data as image or download-link
  • Live charts to monitor MySQL server activity like connections, processes, CPU/Memory usage, etc.
  • Working with different operating systems
Add the EPEL Repository
phpMyAdmin is part of Extra Packages for Enterprise Linux (EPEL), which is a community repository of non-standard packages for the RHEL distribution. First, we’ll install the EPEL repository:
[root@hackthesec]# rpm -iUvh
Install phpMyAdmin
First, you’ll follow a simple best practice: ensuring the list of available packages is up to date before installing anything new.
[root@hackthesec]# yum -y update
After That Run Following Command:-
[root@hackthesec]# yum -y install phpmyadmin
To secure phpMyAdmin we should lock down access to a specific IP address. When the phpMyAdmin package is installed, an Apache Virtual Host file is added to configure web access. Let’s edit that file:
[root@hackthesec]# vi /etc/httpd/conf.d/phpMyAdmin.conf
By default, the configuration for phpMyAdmin only allows access from the server on which it is installed. so you want to allow for all or you can only use your IP address for access..
Require ip

Allow from

Require ip

Allow from
Allow from your IPadress ... 
Just Commit the following line "Deny from All"
 <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     #Deny from All
     Allow from
     Allow from ::1
Restart Apache:
service httpd restart
Verify that phpMyAdmin is working by visiting http://the_IP_of_your_server/phpmyadmin. 
For example:

About Author:

I am a Linux Administrator and Security Expert with this site i can help lot's of people about linux knowladge and as per security expert i also intersted about hacking related news.TwitterFacebook

Newer Post
Older Post


Post a Comment