phpMyAdmin for multi-user environment on OSX Server 10.4+ (TIGER)

1.

This installation assumes that your webserver with php is already up and running.

Download and unstuff phpMyAdmin 2.11.5.1 folder. Rename the folder 'phpMyAdmin' and move it to your webserver directory (/Library/WebServer/Documents/phpMyAdmin).

cd /Library/WebServer/Documents/phpMyAdmin
cp libraries/config.default.php config.inc.php
open -e config.inc.php

Edit the folloing lines:

Line 31:              $cfg['PmaAbsoluteUri'] = '';
To look like this:   $cfg['PmaAbsoluteUri'] = 'http://127.0.0.1/phpMyAdmin/';

Line 57:               $cfg['Servers'][$i]['host']  = ''; // MySQL hostname or IP address
To look like this:  $cfg['Servers'][$i]['host'] = '127.0.0.1'; // MySQL hostname or IP address

Line 71:               $cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)?
To this:                 $cfg['Servers'][$i]['auth_type'] = 'http'; // Authentication method (config, http or cookie based)?

HTTP and cookie authentication modes are recommended in a multi-user environment where you want to give users access to their own database and don't want them to play around with others.

2.

Download and unstuff setup.sql.zip to your desktop. Open your terminal and run setup.sql.

mysql -u root

mysql> \. /private/var/root/Desktop/setup.sql
mysql> quit
	
sudo /Library/StartupItems/MySQLCOM/MySQLCOM restart

3.

Open your browser and point to http://127.0.0.1/phpMyAdmin/. Login with username 'root' and password 'secret'.

Setup has created 'test' and 'test1' databases for users 'test' and 'test1'. In both instances you may log in with the paswords 'secret' to gain access only to their respective databases with privileges and rights pertaining only to that database.

Setup also has created a user called 'root' that has access to everything and all databases. The initial pasword is 'secret'.

Needless to say, all passwords should be changed upon first login.

For each new setup just add a username under mysql database's user table with the same priviledges as test1 and test2 and add a new entry in the db table to show the name of database and user.