phpMyAdmin for multi-user environment on OSX Server 10.3.9 (Panther)

1.

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

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

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

Edit the folloing lines:

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

Line 61: $cfg['Servers'][$i]['socket'] = '/var/mysql/mysql.sock'; // Path to the socket - leave blank for default socket
insert the location of "sock" file "/var/mysql/mysql.sock"

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

Line 73: $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.sit 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 'test1' and 'test2' databases for users 'test1' and 'test2'. 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.