Installing phpMyAdmin on localhost (Mac OSX 10.8)

Download the latest version at (4.0.5 used in this example)

http://www.phpmyadmin.net/home_page/downloads.php

Unpack the downloaded file where ever your apache server defaults to (or some place else if you prefer)

I use /Users/myloginname/Sites/

 

Rename the folder that was created when the file unpacked

I use phpMyAdmin/

 

In Terminal create a config/ directory under the new folder

$ mkdir ~/Sites/phpMyAdmin/config

Set the permissions

$ chmod o+w ~/Sites/phpMyAdmin/config

While still in Terminal, fix a bug in OSX (assuming your MySQL is already up and running)

$ sudo mkdir /var/mysql

$ sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock

Then in a browser, run the setup

http://localhost/phpMyAdmin/setup

Select your default language, default server, end of line settings

Click "New server" button" for initial setup

Click the "Authentication" tab

Enter "root" for the "User for config auth" field

Enter your mysql root password in the "Password for config auth" field

Make sure you click on save, then a config.inc.php is now in the config/ directory, move this file to the root level of /phpmyadmin and then remove the now empty config/ directory.

$ cp config/config.inc.php .

$ rm -rf config

Now going to http://localhost/phpmyadmin/ will now allow you to interact with your MySQL databases.

To upgrade phpmyadmin just download the latest version and copy the older config.inc.php from the existing directory into the new folder and replace - backup the older one just in case.