Revision of phpMyAdmin from Tue, 10/26/2010 - 11:49

Revisions allow you to track differences between multiple versions of your content, and revert back to older versions.

phpMyAdmin is a browser-based utility for managing MySQL databases.

Prerequisites
phpMyAdmin likes to have libmcrypt installed with your PHP:

yum -y install libmcrypt-devel

Then compile your PHP with mcrypt support by adding --with-mcrypt to it's configure options.

Apache Configuration
Create a base directory for the your private, local site:

mkdir -p /var/websites/private/logs/
mkdir -p /var/websites/private/htdocs

Edit /usr/local/apache2/conf/httpd.conf and add a non-standard port for it to listen on (maximum allowed is 65535):

Listen 12345

Edit /usr/local/apache2/conf/extra/httpd-vhosts.conf and add a virtual host directive:

<VirtualHost _default_:12345>
  DocumentRoot /var/websites/private/htdocs

  <Directory /var/websites/private/htdocs>
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>

  ErrorLog /var/websites/private/logs/private-error_log
  CustomLog /var/websites/private/logs/private-access_log combined
</VirtualHost>

Installation
Download the source tarball:

cd /var/websites/private/htdocs
wget http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/3.3.1/phpMyAdmin-3.3.1-all-languages.tar.gz?use_mirror=softlayer
tar zxf phpMyAdmin-3.3.1-all-languages.tar.gz
rm phpMyAdmin-3.3.1-all-languages.tar.gz

Move the phpmyadmin source files into the base directory:

mv phpMyAdmin-3.3.1-all-languages phpmyadmin
chown -R nobody:nobody phpmyadmin

Configuration
In order to use the config script, we'll need to set up a conf directory:

cd /var/websites/private/htdocs/phpmyadmin
mkdir config
chown nobody:nobody config
chmod o+rw config

Access the setup script at http://<myserver>:12345/phpmyadmin/setup For the typical local install of MySQL, the default options for a new server will work just fine. If you are want to add a MySQL Sandbox server, then configure it with the sandbox's Server port(eg. 5141), Server socket (eg. /tmp/mysql_sandbox5141.sock), and set the Connection type to socket.

Once the config file has been saved, move it to the proper location:

cd /var/websites/private/htdocs/phpmyadmin
mv config/config.inc.php .
chmod o-rw config.inc.php

You should delete the config directory once you are done:

rm -rf config

Recent Updates

  • 8 months 1 day ago
    1.27.2 update
  • 8 months 1 week ago
    Drupal 10/11 config
  • 8 months 1 week ago
  • PHP
    8 months 1 week ago
    PHP 8.3.11 and AlmaLinux
  • 8 months 2 weeks ago
    New version of Pound