How to Install phpMyAdmin on Ubuntu 14.04

phpMyAdmin is a open source software that intended to manage and administer MySQL over the Web browsers and it was written in PHP. It is one of the most popular tools for managing the MySQL database and you’ll need to install and configure Apache, PHP, and the PHP MySQL in order to make it run perfectly. Follow the following steps to install phpMyAdmin on Ubuntu 14.04 virtual private server (VPS)and dedicated server.

1. Assumed that Apache web server and MySQL database server has been prepared.

2. Install phpmyadmin :

ehowstuff@ubuntu14:~$ sudo apt-get install phpmyadmin -y

3. Configure Apache :

ehowstuff@ubuntu14:~$ sudo vi /etc/phpmyadmin/apache.conf

Add IP as below :

# phpMyAdmin default Apache configuration

Alias /phpmyadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
        Options FollowSymLinks
        DirectoryIndex index.php
        Require ip
        <IfModule mod_php5.c>
                AddType application/x-httpd-php .php

                php_flag magic_quotes_gpc Off
                php_flag track_vars On
                php_flag register_globals Off
                php_admin_flag allow_url_fopen Off
                php_value include_path .
                php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
                php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/


4. Restart Apache :

ehowstuff@ubuntu14:~$ sudo /etc/init.d/apache2 restart
 * Restarting web server apache2                                                             [ OK ]

5. Access to “http://IP_address/phpmyadmin/” and login to MySQL.