Skip to topic | Skip to bottom
Home
Freebsd
Freebsd.PhpMyAdminr1.4 - 14 Sep 2005 - 17:39 - MikeHursttopic end

Start of topic | Skip to actions

The PhpMyAdmin web based mysql admin tool

PhpMyAdmin is a web based administration tool for mysql.

IMPORTANT

The effect of installing phpmyadmin is to discard mysql host based authentication, as connections via phpmyadmin will appear to come from localhost. For this reason, phpmyadmin should be protected by .htaccess as described below.

Install

cd /usr/ports/databases/phpmyadmin
make
make install
ln -s /usr/local/www/phpMyAdmin /usr/local/www/data/phpMyAdmin
cd /usr/local/www/data/phpMyAdmin
cp config.inc.php.sample config.inc.php
vi config.inc.php
And change:
$cfg['PmaAbsoluteUri'] = '';
$cfg['blowfish_secret'] = ''
$cfg['Servers'][$i]['auth_type']     = 'config';    // Authentication method (config, http or cookie based)?
$cfg['ShowChgPassword']       = FALSE;  // simple users or not
to:
$cfg['PmaAbsoluteUri'] = 'https://yourhost.yourdomain/phpMyAdmin/';
$cfg['blowfish_secret'] = 'YourSecRet'
$cfg['Servers'][$i]['auth_type']     = 'cookie';    // Authentication method (config, http or cookie based)?
$cfg['ShowChgPassword']       = TRUE;  // simple users or not
  • Add to /usr/local/etc/apache/httpd.conf:
<Directory /usr/local/www/data/phpMyAdmin>
    Allow from all
    AllowOverride All
</Directory>
  • Create /usr/local/www/data/phpMyAdmin/.htaccess as shown in ApacheWebServer in the mod_auth_radius section, except instead of:
require valid-user
use
require user list-of-users
where list-of-users is a space separated list of trusted users

The reason for the .htaccess on the phpMyAdmin directory is to protect the mysql databases from unauthorized access. Often, mysql is configured to permit access from specific hosts, typically localhost, and weak passwords may be employed. phpMyAdmin will connect to the local database and appear to come from localhost, rendering useless mysql host based permissions.

-- BruceCampbell - 27 Dec 2002
to top


You are here: Freebsd > MyWaterloo > PhpMyAdmin

to top

Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback