Introduction


MySQL is one of the most popular and powerful database for web-based applications. This widely used open-source relational database management system can be extremely useful to process your dynamic content and your next generation of web-applications.

 

But while MySQL provides a power database, it can sometimes become quite difficult for novice users to manage. In this scenario, phpMyAdmin is a tool written in PHP intended to handle the administration of MySQL servers over the world wide web. You can use almost all the most frequently used operations like managing databases, tables, fields, relations, users, permissions and execute SQL statements.

 

In this tutorial we'll guide you on how to install the phpMyAdmin tool to handle the administration of MySQL Servers on your VPS or any other Linux servers.

 

How to install and configure phpMyAdmin to manage a MySQL Database Server


1. Install the EPEL Repository

The easiest way to install phpMyAdmin is through the yum utility. but is it important to know that phpMyAdmin is not included on default CentOS/RHEL repositories. Therefore, we need to install the EPEL repository as follows:

wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm
rpm -ivh epel-release-6-7.noarch.rpm

 

2. Install phpMyAdmin


Now that you have EPEL repository on your server, you can proceed and install phpMyAdmin.

yum -y install phpmyadmin

 

phpMyAdmin will install along with all its dependencies. Output should be similar to this:

Loaded plugins: rhnplugin
Setting up Install Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
--> Running transaction check
---> Package phpMyAdmin.noarch 0:3.5.1-1.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==================================================================================================
 Package                  Arch                 Version                   Repository          Size
==================================================================================================
Installing:
 phpMyAdmin               noarch               3.5.1-1.el6               epel               4.2 M
Transaction Summary
==================================================================================================
Install       1 Package(s)
Total download size: 4.2 M
Installed size: 17 M
Downloading Packages:
phpMyAdmin-3.5.1-1.el6.noarch.rpm                                          | 4.2 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : phpMyAdmin-3.5.1-1.el6.noarch                                                  1/1
  Verifying  : phpMyAdmin-3.5.1-1.el6.noarch                                                  1/1
Installed:
  phpMyAdmin.noarch 0:3.5.1-1.el6

 

You now have phpMyAdmin installed on your server.

 

3. Configure phpMyAdmin


Now that phpMyAdmin is installed, you can further configure it in order to be able to access it through the world wide web. It's default value is pre-set to only allow local connections.

 

Edit the /etc/httpd/conf.d/phpMyAdmin.conf file.

vi /etc/httpd/conf.d/phpMyAdmin.conf

 

Look for the line:

Require ip 127.0.0.1

 

Should be set to:

Require ip MY_IP_ADDRESS

 

Now, look for the line:

Allow from 127.0.0.1

 

And change it to:

Allow from MY_IP_ADDRESS

 

Now you can save and close the file.

 

4. Restart Apache Web Server


After you've made any changes to the .config file, Apache must be restarted for the changes to take effect.

service httpd restart

 

5. Access phpMyAdmin


Installation has been completed, now you should be able to access your phpMyAdmin GUI through your IP address and phpMyAdmin path, as follows:

https://my.server.com/phpMyAdmin/

 

Once on the GUI of phpMyAdmin, you will be required to enter your database username and password.

 

Test on a Miami VPS Now

or

Deploy on a Miami Dedicated Server

Was this answer helpful? 2 Users Found This Useful (8 Votes)