How to configure phpMyAdmin in a secure way without yum CentOS 6.X

As we know that we is a great GUI tool to handle mysql database, there are always security matters when we talk about the database, so it is important to secure the access of , In this article we cover a complete server setup with LAMP,with secure access by fake url.

first we need to install important repositories to install latest packages , I always prefer remi repository ,we can install this repository as

Install repository as this is require for remi

for 32 bit

#rpm -Uvh epel-release-6*.rpm

for 64 bit

#rpm -Uvh epel-release-6*.rpm

Now download and install Remi repository

#sudo rpm -Uvh remi-release-6*.rpm

Here we are doing fresh installation of php and php module  with mysql-server setup . You can left this step if already have below packages and softwares on server . please verify first. Install required packages as

# install httpd php php-devel php-common php-gd php-pdo php-mysql php-mcrypt php-mbstring mysql-server --enablerepo=remi

you can check php version

# php -v
PHP 5.4.45 (cli) (built: Sep  2 2015 18:54:00)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

Now Start apache and mysql  server

#chkconfig httpd on
#service mysqld start
#chkconfig mysqld on
#configure Mysql

Now configure mysql password , for  this follow below steps as mentioned
Enter current password for root (enter for none):
Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
Remove anonymous users? [Y/n] Set root password? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y

Now next step to configure phpmyadmin  ,

go to /usr/share direcory and download latest version of phpmyadmin .

#cd /usr/share/


#tar xvzf -4.4.14-english.tar.gz

#mv phpMyAdmin-4.4.14-english phpmyadmin

Now edit apache’s configuration file add Alias for

#vi /etc/httpd/conf/httpd.conf
Alias /PMAX /usr/share/phpmyadmin

Now restart the apache

#service httpd restart

go to browser and open with[box] http://your-server-ip/PMAX[/box]




for any query or concern please comment.

About Sachin Gupta

I am a professional freelance contributor and founder of tech transit. Love to write and lover of education, culture, and community. I have been using it, setting, supporting, and maintaining it since 2009.Linux rocks!

Have any Question or Comment?

Leave a Reply

Your email address will not be published. Required fields are marked *