phpMyAdmin

phpMyAdmin is a tool written in PHP intended to handle the administration of MySQL over the Web. Currently it can create and drop databases, create/drop/alter tables, delete/edit/add fields, execute any SQL statement, manage keys on fields.  For more information on phpMyAdmin, you can visit their website at www.phpmyadmin.net.

phpMyAdmin version

This documentation was written for phpMyAdmin 2.11.9.3 but may be usefull with other versions.

How to install phpMyAdmin on CentOS, RedHat, Linux

  1. Install phpMyAdmin required Apache HTTP Server modules
    yum install php-gd php-mcrypt php-mbstring
  2. Download phpMyAdmin 2.11.9.3
    http://prdownloads.sourceforge.net/phpmyadmin/phpMyAdmin-2.11.9.3-all-languages.tar.bz2?download
  3. Extract contents to /var/www/html
  4. Rename the extracted folder to phpmyadmin (no caps)

How to configure phpMyAdmin on CentOS, RedHat, Linux

  1. Create an Apache HTTP Server Virtual Host with the following variable values
    $domain: phpmyadmin
    $webmaster_email: webmaster@phpmyadmin
  2. Create a host entry in in the hosts file with the following variable values
    $ip_address: 127.0.0.1
    $domain: phpmyadmin
  3. Restart the Apache HTTP Server
    service httpd restart
  4. Create a temporary configuration folder
    mkdir /var/www/html/phpmyadmin/config
  5. Set the group of the /var/www/html/phpmyadmin folder and sub folders/files to apache
    chown -hR root:apache /var/www/html/phpmyadmin
  6. Change permissions of /var/www/html/phpmyadmin/config to have world writable permissions
    chmod -R 0770 /var/www/html/phpmyadmin/config
  7. Open phpmyadmin/scripts/setup.php in a browser
    1. Click the Add button under the Servers section
      1. Select cookie for the Authentication type
      2. Click the Add button at the end of the page to add the new server
    2. Click the Save button under the Configuration section
  8. Move the newly created configuration file into the appropriate folder
    mv /var/www/html/phpmyadmin/config/config.inc.php /var/www/html/phpmyadmin/config.inc.php
  9. Change the permissions of the /var/www/html/phpmyadmin/config.inc.php configuration file to not allow world read and write permissions
    chmod -R 0750 /var/www/html/phpmyadmin/config.inc.php

How to test phpMyAdmin on CentOS, RedHat, Linux

Visit phpmyadmin in your web browser.  You should see the phpMyAdmin login page.  Now you can log into phpMyAdmin using any MySQL user.