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

phpmyadmin-ubuntu14-1
phpmyadmin-ubuntu14-2

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 127.0.0.1 192.168.0.0/24
        <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/
        </IfModule>

</Directory>

4. Restart Apache :

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

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

How to Setup phpMyAdmin on CentOS 6.3 using EPEL Repository

phpmyadminThis post will covers the steps to install phpMyAdmin to operate MySQL from Web browser. phpMyAdmin is a free software tool written in PHP intended to handle the administration of MySQL over the World Wide Web. It can manage a whole MySQL server (needs a super-user) as well as a single database. phpMyAdmin supports a wide range of operations with MySQL. The most frequently used operations are supported by the user interface (managing databases, tables, fields, relations, indexes, users, permissions, etc), while you still have the ability to directly execute any SQL statement.

Prerequisites :

How to Configure EPEL Repository on CentOS 6.3
How to Install Httpd on CentOS 6.3
How to Install and Securing MySQL Database Server on CentOS 6.3

1. Install phpmyadmin :

[root@centos63 ~]# yum --enablerepo=epel install phpMyAdmin php-mysql php-mcrypt -y

Examples :

[root@centos63 ~]# yum --enablerepo=epel install phpMyAdmin php-mysql php-mcrypt -y
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: mirror.issp.co.th
 * epel: mirror.nus.edu.sg
 * extras: mirror.issp.co.th
 * updates: mirror.issp.co.th
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-mcrypt.i686 0:5.3.3-1.el6 will be installed
--> Processing Dependency: php-api = 20090626 for package: php-mcrypt-5.3.3-1.el6.i686
--> Processing Dependency: libmcrypt.so.4 for package: php-mcrypt-5.3.3-1.el6.i686
---> Package php-mysql.i686 0:5.3.3-14.el6_3 will be installed
--> Processing Dependency: php-pdo for package: php-mysql-5.3.3-14.el6_3.i686
---> Package phpMyAdmin.noarch 0:3.5.1-1.el6 will be installed
--> Processing Dependency: php-mbstring >= 5.2.0 for package: phpMyAdmin-3.5.1-1.el6.noarch
--> Processing Dependency: php-gd >= 5.2.0 for package: phpMyAdmin-3.5.1-1.el6.noarch
--> Processing Dependency: php >= 5.2.0 for package: phpMyAdmin-3.5.1-1.el6.noarch
--> Processing Dependency: php-php-gettext for package: phpMyAdmin-3.5.1-1.el6.noarch
--> Running transaction check
---> Package libmcrypt.i686 0:2.5.8-9.el6 will be installed
---> Package php.i686 0:5.3.3-14.el6_3 will be installed
--> Processing Dependency: php-cli = 5.3.3-14.el6_3 for package: php-5.3.3-14.el6_3.i686
---> Package php-common.i686 0:5.3.3-14.el6_3 will be installed
---> Package php-gd.i686 0:5.3.3-14.el6_3 will be installed
--> Processing Dependency: libpng12.so.0(PNG12_0) for package: php-gd-5.3.3-14.el6_3.i686
--> Processing Dependency: libpng12.so.0 for package: php-gd-5.3.3-14.el6_3.i686
--> Processing Dependency: libjpeg.so.62 for package: php-gd-5.3.3-14.el6_3.i686
--> Processing Dependency: libfreetype.so.6 for package: php-gd-5.3.3-14.el6_3.i686
--> Processing Dependency: libXpm.so.4 for package: php-gd-5.3.3-14.el6_3.i686
--> Processing Dependency: libX11.so.6 for package: php-gd-5.3.3-14.el6_3.i686
---> Package php-mbstring.i686 0:5.3.3-14.el6_3 will be installed
---> Package php-pdo.i686 0:5.3.3-14.el6_3 will be installed
---> Package php-php-gettext.noarch 0:1.0.11-3.el6 will be installed
--> Running transaction check
---> Package freetype.i686 0:2.3.11-6.el6_2.9 will be installed
---> Package libX11.i686 0:1.3-2.el6 will be installed
--> Processing Dependency: libX11-common = 1.3-2.el6 for package: libX11-1.3-2.el6.i686
--> Processing Dependency: libxcb.so.1 for package: libX11-1.3-2.el6.i686
---> Package libXpm.i686 0:3.5.8-2.el6 will be installed
---> Package libjpeg.i686 0:6b-46.el6 will be installed
---> Package libpng.i686 2:1.2.49-1.el6_2 will be installed
---> Package php-cli.i686 0:5.3.3-14.el6_3 will be installed
--> Running transaction check
---> Package libX11-common.noarch 0:1.3-2.el6 will be installed
---> Package libxcb.i686 0:1.5-1.el6 will be installed
--> Processing Dependency: libXau.so.6 for package: libxcb-1.5-1.el6.i686
--> Running transaction check
---> Package libXau.i686 0:1.0.5-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                 Arch           Version                  Repository                    Size
====================================================================================================
Installing:
 php-mcrypt              i686           5.3.3-1.el6              epel                          18 k
 php-mysql               i686           5.3.3-14.el6_3           updates                       77 k
 phpMyAdmin              noarch         3.5.1-1.el6              epel                         4.2 M
Installing for dependencies:
 freetype                i686           2.3.11-6.el6_2.9         CentOS6.3-Repository         363 k
 libX11                  i686           1.3-2.el6                CentOS6.3-Repository         585 k
 libX11-common           noarch         1.3-2.el6                CentOS6.3-Repository         188 k
 libXau                  i686           1.0.5-1.el6              CentOS6.3-Repository          22 k
 libXpm                  i686           3.5.8-2.el6              CentOS6.3-Repository          58 k
 libjpeg                 i686           6b-46.el6                CentOS6.3-Repository         133 k
 libmcrypt               i686           2.5.8-9.el6              epel                          94 k
 libpng                  i686           2:1.2.49-1.el6_2         CentOS6.3-Repository         184 k
 libxcb                  i686           1.5-1.el6                CentOS6.3-Repository         104 k
 php                     i686           5.3.3-14.el6_3           updates                      1.1 M
 php-cli                 i686           5.3.3-14.el6_3           updates                      2.2 M
 php-common              i686           5.3.3-14.el6_3           updates                      523 k
 php-gd                  i686           5.3.3-14.el6_3           updates                      103 k
 php-mbstring            i686           5.3.3-14.el6_3           updates                      453 k
 php-pdo                 i686           5.3.3-14.el6_3           updates                       72 k
 php-php-gettext         noarch         1.0.11-3.el6             epel                          21 k

Transaction Summary
====================================================================================================
Install      19 Package(s)

Total download size: 10 M
Installed size: 38 M
Downloading Packages:
Setting up and reading Presto delta metadata
updates/prestodelta                                                          |  72 kB     00:00
Processing delta metadata
Package(s) data still to download: 10 M
(1/19): libmcrypt-2.5.8-9.el6.i686.rpm                                       |  94 kB     00:00
(2/19): php-5.3.3-14.el6_3.i686.rpm                                          | 1.1 MB     00:09
(3/19): php-cli-5.3.3-14.el6_3.i686.rpm                                      | 2.2 MB     00:19
(4/19): php-common-5.3.3-14.el6_3.i686.rpm                                   | 523 kB     00:04
(5/19): php-gd-5.3.3-14.el6_3.i686.rpm                                       | 103 kB     00:00
(6/19): php-mbstring-5.3.3-14.el6_3.i686.rpm                                 | 453 kB     00:04
(7/19): php-mcrypt-5.3.3-1.el6.i686.rpm                                      |  18 kB     00:00
(8/19): php-mysql-5.3.3-14.el6_3.i686.rpm                                    |  77 kB     00:00
(9/19): php-pdo-5.3.3-14.el6_3.i686.rpm                                      |  72 kB     00:00
(10/19): php-php-gettext-1.0.11-3.el6.noarch.rpm                             |  21 kB     00:00
(11/19): phpMyAdmin-3.5.1-1.el6.noarch.rpm                                   | 4.2 MB     00:36
----------------------------------------------------------------------------------------------------
Total                                                               135 kB/s |  10 MB     01:19
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : php-common-5.3.3-14.el6_3.i686                                                  1/19
  Installing : libX11-common-1.3-2.el6.noarch                                                  2/19
  Installing : php-mbstring-5.3.3-14.el6_3.i686                                                3/19
  Installing : php-php-gettext-1.0.11-3.el6.noarch                                             4/19
  Installing : php-cli-5.3.3-14.el6_3.i686                                                     5/19
  Installing : php-5.3.3-14.el6_3.i686                                                         6/19
  Installing : php-pdo-5.3.3-14.el6_3.i686                                                     7/19
  Installing : php-mysql-5.3.3-14.el6_3.i686                                                   8/19
  Installing : libmcrypt-2.5.8-9.el6.i686                                                      9/19
  Installing : php-mcrypt-5.3.3-1.el6.i686                                                    10/19
  Installing : libjpeg-6b-46.el6.i686                                                         11/19
  Installing : 2:libpng-1.2.49-1.el6_2.i686                                                   12/19
  Installing : libXau-1.0.5-1.el6.i686                                                        13/19
  Installing : libxcb-1.5-1.el6.i686                                                          14/19
  Installing : libX11-1.3-2.el6.i686                                                          15/19
  Installing : libXpm-3.5.8-2.el6.i686                                                        16/19
  Installing : freetype-2.3.11-6.el6_2.9.i686                                                 17/19
  Installing : php-gd-5.3.3-14.el6_3.i686                                                     18/19
  Installing : phpMyAdmin-3.5.1-1.el6.noarch                                                  19/19
  Verifying  : freetype-2.3.11-6.el6_2.9.i686                                                  1/19
  Verifying  : php-5.3.3-14.el6_3.i686                                                         2/19
  Verifying  : php-cli-5.3.3-14.el6_3.i686                                                     3/19
  Verifying  : libXau-1.0.5-1.el6.i686                                                         4/19
  Verifying  : php-common-5.3.3-14.el6_3.i686                                                  5/19
  Verifying  : php-mbstring-5.3.3-14.el6_3.i686                                                6/19
  Verifying  : libXpm-3.5.8-2.el6.i686                                                         7/19
  Verifying  : 2:libpng-1.2.49-1.el6_2.i686                                                    8/19
  Verifying  : libxcb-1.5-1.el6.i686                                                           9/19
  Verifying  : phpMyAdmin-3.5.1-1.el6.noarch                                                  10/19
  Verifying  : libX11-1.3-2.el6.i686                                                          11/19
  Verifying  : php-php-gettext-1.0.11-3.el6.noarch                                            12/19
  Verifying  : php-gd-5.3.3-14.el6_3.i686                                                     13/19
  Verifying  : libjpeg-6b-46.el6.i686                                                         14/19
  Verifying  : libX11-common-1.3-2.el6.noarch                                                 15/19
  Verifying  : php-mysql-5.3.3-14.el6_3.i686                                                  16/19
  Verifying  : php-pdo-5.3.3-14.el6_3.i686                                                    17/19
  Verifying  : php-mcrypt-5.3.3-1.el6.i686                                                    18/19
  Verifying  : libmcrypt-2.5.8-9.el6.i686                                                     19/19

Installed:
  php-mcrypt.i686 0:5.3.3-1.el6  php-mysql.i686 0:5.3.3-14.el6_3  phpMyAdmin.noarch 0:3.5.1-1.el6

Dependency Installed:
  freetype.i686 0:2.3.11-6.el6_2.9               libX11.i686 0:1.3-2.el6
  libX11-common.noarch 0:1.3-2.el6               libXau.i686 0:1.0.5-1.el6
  libXpm.i686 0:3.5.8-2.el6                      libjpeg.i686 0:6b-46.el6
  libmcrypt.i686 0:2.5.8-9.el6                   libpng.i686 2:1.2.49-1.el6_2
  libxcb.i686 0:1.5-1.el6                        php.i686 0:5.3.3-14.el6_3
  php-cli.i686 0:5.3.3-14.el6_3                  php-common.i686 0:5.3.3-14.el6_3
  php-gd.i686 0:5.3.3-14.el6_3                   php-mbstring.i686 0:5.3.3-14.el6_3
  php-pdo.i686 0:5.3.3-14.el6_3                  php-php-gettext.noarch 0:1.0.11-3.el6

Complete!

2. on Line 14 or 15, add IP address you permit. In this case i have added 192.168.1.0/24 and i’m using apache 2.2 :

[root@centos63 ~]# vi /etc/httpd/conf.d/phpMyAdmin.conf
<Directory /usr/share/phpMyAdmin/>
   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       Require ip 127.0.0.1
       Require ip ::1
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 127.0.0.1 192.168.1.0/24
     Allow from ::1
   </IfModule>
</Directory>

3. Reload or restart apache httpd :

[root@centos63 ~]# /etc/rc.d/init.d/httpd reload
Reloading httpd:

How to Setup phpMyAdmin 3.5.1 on CentOS 6.2 using Remi Repository

phpmyadminphpMyAdmin is a free and open source tool written in PHP intended to handle the administration of MySQL with the use of a Web browser. It is a tools that giving users the ability to interact with their MySQL databases to perform the task such as creating, modifying or drop databases, executing SQL statements, managing users and set permissions. This post will show you the steps on how to setup phpMyAdmin 3.5.1 on CentOS 6.2 using remi repository.

Prerequisites :
How to Install Remi yum Repository on CentOS 6.2 x86 and x86_64

Simply execute the following command to install phpmyadmin :

[root@centos62 ~]# yum install phpmyadmin -y
Loaded plugins: fastestmirror, priorities
Determining fastest mirrors
 * base: mirror.averse.net
 * extras: mirror.yourconnect.com
 * remi: iut-info.univ-reims.fr
 * remi-test: iut-info.univ-reims.fr
 * updates: mirror.yourconnect.com
base                                                                         | 3.7 kB     00:00
base/primary_db                                                              | 3.5 MB     00:34
extras                                                                       | 3.5 kB     00:00
extras/primary_db                                                            | 9.1 kB     00:00
remi                                                                         | 2.9 kB     00:00
remi/primary_db                                                              | 259 kB     00:02
remi-test                                                                    | 2.9 kB     00:00
remi-test/primary_db                                                         |  80 kB     00:01
updates                                                                      | 3.5 kB     00:00
updates/primary_db                                                           | 3.9 MB     00:35
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package phpMyAdmin.noarch 0:3.5.1-1.el6.remi will be installed
--> Processing Dependency: php-mysql >= 5.2.0 for package: phpMyAdmin-3.5.1-1.el6.remi.noarch
--> Processing Dependency: php-mcrypt >= 5.2.0 for package: phpMyAdmin-3.5.1-1.el6.remi.noarch
--> Processing Dependency: php-mbstring >= 5.2.0 for package: phpMyAdmin-3.5.1-1.el6.remi.noarch
--> Processing Dependency: php-gd >= 5.2.0 for package: phpMyAdmin-3.5.1-1.el6.remi.noarch
--> Running transaction check
---> Package php-gd.i686 0:5.4.4-1.el6.remi will be installed
---> Package php-mbstring.i686 0:5.4.4-1.el6.remi will be installed
---> Package php-mcrypt.i686 0:5.4.4-1.el6.remi will be installed
---> Package php-mysql.i686 0:5.4.4-1.el6.remi will be installed
--> Processing Dependency: php-pdo(x86-32) = 5.4.4-1.el6.remi for package: php-mysql-5.4.4-1.el6.remi.i686
--> Running transaction check
---> Package php-pdo.i686 0:5.4.4-1.el6.remi will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                 Arch              Version                       Repository            Size
====================================================================================================
Installing:
 phpMyAdmin              noarch            3.5.1-1.el6.remi              remi                 4.7 M
Installing for dependencies:
 php-gd                  i686              5.4.4-1.el6.remi              remi-test            132 k
 php-mbstring            i686              5.4.4-1.el6.remi              remi-test            921 k
 php-mcrypt              i686              5.4.4-1.el6.remi              remi-test             41 k
 php-mysql               i686              5.4.4-1.el6.remi              remi-test            122 k
 php-pdo                 i686              5.4.4-1.el6.remi              remi-test            107 k

Transaction Summary
====================================================================================================
Install       6 Package(s)

Total download size: 6.0 M
Installed size: 21 M
Downloading Packages:
(1/6): php-gd-5.4.4-1.el6.remi.i686.rpm                                      | 132 kB     00:11
(2/6): php-mbstring-5.4.4-1.el6.remi.i686.rpm                                | 921 kB     00:28
(3/6): php-mcrypt-5.4.4-1.el6.remi.i686.rpm                                  |  41 kB     00:01
(4/6): php-mysql-5.4.4-1.el6.remi.i686.rpm                                   | 122 kB     00:02
(5/6): php-pdo-5.4.4-1.el6.remi.i686.rpm                                     | 107 kB     00:01
(6/6): phpMyAdmin-3.5.1-1.el6.remi.noarch.rpm                                | 4.7 MB     01:14
----------------------------------------------------------------------------------------------------
Total                                                                50 kB/s | 6.0 MB     02:04
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : php-gd-5.4.4-1.el6.remi.i686                                                     1/6
  Installing : php-mcrypt-5.4.4-1.el6.remi.i686                                                 2/6
  Installing : php-pdo-5.4.4-1.el6.remi.i686                                                    3/6
  Installing : php-mysql-5.4.4-1.el6.remi.i686                                                  4/6
  Installing : php-mbstring-5.4.4-1.el6.remi.i686                                               5/6
  Installing : phpMyAdmin-3.5.1-1.el6.remi.noarch                                               6/6

Installed:
  phpMyAdmin.noarch 0:3.5.1-1.el6.remi

Dependency Installed:
  php-gd.i686 0:5.4.4-1.el6.remi                  php-mbstring.i686 0:5.4.4-1.el6.remi
  php-mcrypt.i686 0:5.4.4-1.el6.remi              php-mysql.i686 0:5.4.4-1.el6.remi
  php-pdo.i686 0:5.4.4-1.el6.remi

Complete!
[root@centos62 ~]# vim /etc/httpd/conf.d/phpMyAdmin.conf

Original configuration file :

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
<Directory /usr/share/phpMyAdmin/>
   order deny,allow
   deny from all
   allow from 127.0.0.1
   allow from ::1
</Directory>

Modify to the following :

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
<Directory /usr/share/phpMyAdmin/>
   order deny,allow
   deny from all
   allow from 127.0.0.1
   allow from all
</Directory>

Once configured, restart the httpd as below :

[root@centos62 ~]# service httpd restart

Login to the phpmyadmin as below :
http://192.168.1.44/phpmyadmin

How to Install phpMyAdmin on CentOS 6.2 using EPEL Repository

phpmyadmin

PhpMyAdmin

phpMyAdmin is a free software tool written in PHP intended to handle the administration of MySQL over the World Wide Web. It can manage a whole MySQL server (needs a super-user) as well as a single database. phpMyAdmin supports a wide range of operations with MySQL. The most frequently used operations are supported by the user interface (managing databases, tables, fields, relations, indexes, users, permissions, etc), while you still have the ability to directly execute any SQL statement. In this post, i will show on how to install phpMyAdmin on CentOS 6.2 using EPEL repository. This post assumed that MySQL and Apache Httpd server has been installed and configured as per documented guidelines below :
How to Install Httpd on CentOS 6.2
How to Install MySQL Database Server on CentOS 6.2
How to Secure MySQL Database Server

1. How to Install and Configure EPEL Repository :
Follow this steps to install and configure the Extra Packages for Enterprise Linux (EPEL) repository on CentOS 6.2. EPEL repository is another extra repository that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL) and CentOS server.

2. Simply run yum command to install phpmyadmin :

[root@centos62 ~]# yum install phpmyadmin -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.hostemo.com
 * epel: ftp.riken.jp
 * extras: mirrors.hostemo.com
 * updates: ossm.utm.my
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package phpMyAdmin.noarch 0:3.4.9-1.el6 will be installed
--> Processing Dependency: php-gd >= 5.2.0 for package: phpMyAdmin-3.4.9-1.el6.noarch
--> Processing Dependency: php-php-gettext for package: phpMyAdmin-3.4.9-1.el6.noarch
--> Running transaction check
---> Package php-gd.i686 0:5.3.3-3.el6_2.6 will be installed
---> Package php-php-gettext.noarch 0:1.0.11-3.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                    Arch              Version                      Repository          Size
====================================================================================================
Installing:
 phpMyAdmin                 noarch            3.4.9-1.el6                  epel               4.1 M
Installing for dependencies:
 php-gd                     i686              5.3.3-3.el6_2.6              updates            102 k
 php-php-gettext            noarch            1.0.11-3.el6                 epel                21 k

Transaction Summary
====================================================================================================
Install       3 Package(s)

Total download size: 4.2 M
Installed size: 15 M
Downloading Packages:
(1/3): php-gd-5.3.3-3.el6_2.6.i686.rpm                                       | 102 kB     00:00
(2/3): php-php-gettext-1.0.11-3.el6.noarch.rpm                               |  21 kB     00:00
(3/3): phpMyAdmin-3.4.9-1.el6.noarch.rpm                                     | 4.1 MB     00:46
----------------------------------------------------------------------------------------------------
Total                                                                89 kB/s | 4.2 MB     00:48
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : php-php-gettext-1.0.11-3.el6.noarch                                              1/3
  Installing : php-gd-5.3.3-3.el6_2.6.i686                                                      2/3
  Installing : phpMyAdmin-3.4.9-1.el6.noarch                                                    3/3

Installed:
  phpMyAdmin.noarch 0:3.4.9-1.el6

Dependency Installed:
  php-gd.i686 0:5.3.3-3.el6_2.6                php-php-gettext.noarch 0:1.0.11-3.el6

Complete!

3. Open the phpMyAdmin.conf configuration file as below :

[root@centos62 ~]# vi /etc/httpd/conf.d/phpMyAdmin.conf

Original phpMyAdmin.conf configuration file :

<Directory /usr/share/phpMyAdmin/>
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</Directory>

Change as below. Default setting only allows only localhost. Changes below will allow access to any ip address but very dangerous unless properly secured by SSL :

<Directory /usr/share/phpMyAdmin/>
Order Deny,Allow
Deny from All
Allow from All
Allow from ::1
</Directory>

4. Restart apache httpd service to take effect :

[root@centos62 ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

5. Open PhpMyAdmin from myour browser using the following URL :

http://ipaddress/phpmyadmin/

How to Install phpMyAdmin on CentOS 5.7 using RPMforge Repository

phpMyAdmin is a free software tool written in PHP intended to handle the administration of MySQL over the World Wide Web. It can manage a whole MySQL server (needs a super-user) as well as a single database. phpMyAdmin supports a wide range of operations with MySQL. The most frequently used operations are supported by the user interface (managing databases, tables, fields, relations, indexes, users, permissions, etc), while you still have the ability to directly execute any SQL statement. In this post, i will show on how to install phpMyAdmin on CentOS 5.7 using RPMforge repository. This steps has been tested on CentOS 5.7, but it may working on CentOS 5.1, CentOS 5.2, CentOS 5.4, CentOS 5.5, CentOS 5.6 and RHEL 5. At the time this article wrote, the installed phpMyAdmin was phpMyAdmin version 2.11. This post assumed that third party repository RPMforge has been added, MySQL and Apache Httpd server also has been installed and configured as per guidelines below :

How to Install MySQL Database Server on CentOS 5.7
How to Install Httpd on CentOS 5.7
How to Add the RPMforge Repository on CentOS 5/RHEL 5 Linux Server

1. Simply run this command to install phpMyAdmin :

[root@CentOS57 ~]# yum install phpmyadmin -y
[root@CentOS57 ~]# yum install phpmyadmin -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.oscc.org.my
 * extras: mirror.oscc.org.my
 * rpmforge: ftp-stud.fht-esslingen.de
 * updates: mirror.oscc.org.my
base                                                                         | 1.1 kB     00:00
extras                                                                       | 2.1 kB     00:00
updates                                                                      | 1.9 kB     00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package phpmyadmin.noarch 0:2.11.11.3-2.el5.rf set to be updated
--> Processing Dependency: php-mysql >= 4.1.0 for package: phpmyadmin
--> Processing Dependency: php-mbstring >= 4.1.0 for package: phpmyadmin
--> Processing Dependency: php-mcrypt for package: phpmyadmin
--> Running transaction check
---> Package php-mbstring.i386 0:5.1.6-32.el5 set to be updated
--> Processing Dependency: php-common = 5.1.6-32.el5 for package: php-mbstring
---> Package php-mcrypt.i386 0:5.1.6-15.el5.centos.1 set to be updated
--> Processing Dependency: php >= 5.1.6 for package: php-mcrypt
--> Processing Dependency: libmcrypt.so.4 for package: php-mcrypt
---> Package php-mysql.i386 0:5.1.6-32.el5 set to be updated
--> Processing Dependency: php-pdo for package: php-mysql
--> Running transaction check
---> Package libmcrypt.i386 0:2.5.8-4.el5.centos set to be updated
---> Package php.i386 0:5.1.6-32.el5 set to be updated
--> Processing Dependency: php-cli = 5.1.6-32.el5 for package: php
--> Processing Dependency: libcurl.so.3 for package: php
--> Processing Dependency: libgmp.so.3 for package: php
--> Processing Dependency: libidn.so.11 for package: php
--> Processing Dependency: libaspell.so.15 for package: php
--> Processing Dependency: libpspell.so.15 for package: php
---> Package php-common.i386 0:5.1.6-32.el5 set to be updated
---> Package php-pdo.i386 0:5.1.6-32.el5 set to be updated
--> Running transaction check
---> Package aspell.i386 12:0.60.3-12 set to be updated
--> Processing Dependency: aspell-en for package: aspell
---> Package curl.i386 0:7.15.5-15.el5 set to be updated
---> Package gmp.i386 0:4.1.4-10.el5 set to be updated
---> Package libidn.i386 0:0.6.5-1.1 set to be updated
---> Package php-cli.i386 0:5.1.6-32.el5 set to be updated
--> Running transaction check
---> Package aspell-en.i386 50:6.0-2.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                Arch             Version                           Repository          Size
====================================================================================================
Installing:
 phpmyadmin             noarch           2.11.11.3-2.el5.rf                rpmforge           4.2 M
Installing for dependencies:
 aspell                 i386             12:0.60.3-12                      base               946 k
 aspell-en              i386             50:6.0-2.1                        base               1.6 M
 curl                   i386             7.15.5-15.el5                     base               235 k
 gmp                    i386             4.1.4-10.el5                      base               664 k
 libidn                 i386             0.6.5-1.1                         base               194 k
 libmcrypt              i386             2.5.8-4.el5.centos                extras             116 k
 php                    i386             5.1.6-32.el5                      base               2.3 M
 php-cli                i386             5.1.6-32.el5                      base               2.1 M
 php-common             i386             5.1.6-32.el5                      base               153 k
 php-mbstring           i386             5.1.6-32.el5                      base               996 k
 php-mcrypt             i386             5.1.6-15.el5.centos.1             extras              16 k
 php-mysql              i386             5.1.6-32.el5                      base                87 k
 php-pdo                i386             5.1.6-32.el5                      base                66 k

Transaction Summary
====================================================================================================
Install      14 Package(s)
Upgrade       0 Package(s)

Total download size: 14 M
Downloading Packages:
(1/14): php-mcrypt-5.1.6-15.el5.centos.1.i386.rpm                            |  16 kB     00:00
(2/14): php-pdo-5.1.6-32.el5.i386.rpm                                        |  66 kB     00:00
(3/14): php-mysql-5.1.6-32.el5.i386.rpm                                      |  87 kB     00:00
(4/14): libmcrypt-2.5.8-4.el5.centos.i386.rpm                                | 116 kB     00:01
(5/14): php-common-5.1.6-32.el5.i386.rpm                                     | 153 kB     00:01
(6/14): libidn-0.6.5-1.1.i386.rpm                                            | 194 kB     00:01
(7/14): curl-7.15.5-15.el5.i386.rpm                                          | 235 kB     00:01
(8/14): gmp-4.1.4-10.el5.i386.rpm                                            | 664 kB     00:05
(9/14): aspell-0.60.3-12.i386.rpm                                            | 946 kB     00:11
(10/14): php-mbstring-5.1.6-32.el5.i386.rpm                                  | 996 kB     00:08
(11/14): aspell-en-6.0-2.1.i386.rpm                                          | 1.6 MB     00:13
(12/14): php-cli-5.1.6-32.el5.i386.rpm                                       | 2.1 MB     00:20
(13/14): php-5.1.6-32.el5.i386.rpm                                           | 2.3 MB     00:23
(14/14): phpmyadmin-2.11.11.3-2.el5.rf.noarch.rpm                            | 4.2 MB     00:42
----------------------------------------------------------------------------------------------------
Total                                                               103 kB/s |  14 MB     02:14
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : php-common                                                                  1/14
  Installing     : libidn                                                                      2/14
  Installing     : curl                                                                        3/14
  Installing     : gmp                                                                         4/14
  Installing     : php-mbstring                                                                5/14
  Installing     : php-pdo                                                                     6/14
  Installing     : php-mysql                                                                   7/14
  Installing     : libmcrypt                                                                   8/14
  Installing     : aspell-en                                                                   9/14
  Installing     : aspell                                                                     10/14
  Installing     : php-cli                                                                    11/14
  Installing     : php                                                                        12/14
  Installing     : php-mcrypt                                                                 13/14
  Installing     : phpmyadmin                                                                 14/14

Installed:
  phpmyadmin.noarch 0:2.11.11.3-2.el5.rf

Dependency Installed:
  aspell.i386 12:0.60.3-12                           aspell-en.i386 50:6.0-2.1
  curl.i386 0:7.15.5-15.el5                          gmp.i386 0:4.1.4-10.el5
  libidn.i386 0:0.6.5-1.1                            libmcrypt.i386 0:2.5.8-4.el5.centos
  php.i386 0:5.1.6-32.el5                            php-cli.i386 0:5.1.6-32.el5
  php-common.i386 0:5.1.6-32.el5                     php-mbstring.i386 0:5.1.6-32.el5
  php-mcrypt.i386 0:5.1.6-15.el5.centos.1            php-mysql.i386 0:5.1.6-32.el5
  php-pdo.i386 0:5.1.6-32.el5

Complete!

2. Configure phpMyAdmin to allows connections not just from localhost by change the following line :

Allow from 127.0.0.1

to

Allow from all

New Configuration should as below :

#
#  Web application to manage MySQL
#

<Directory "/usr/share/phpmyadmin">
  Order Deny,Allow
  Deny from all
  Allow from all
</Directory>

Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin

3. Change the authentication in phpMyAdmin from cookie to http :

/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';

4. Reload or restart the apache server :

[root@CentOS57 ~]# service httpd reload
  •  Apache: http://httpd.apache.org/
  • References :

  • PHP: http://www.php.net/
  • MySQL: http://www.mysql.com/
  • CentOS: http://www.centos.org/
  • phpMyAdmin: http://www.phpmyadmin.net/