phpMyAdmin is a web based GUI tool written in PHP for administering MySQL servers. This guide assumes that LAMP (Linux, Apache, MySQL, PHP) is already installed, and MySQL server is populated with databases (i.e. not empty).
To set up a virtual machine running Ubuntu with Apache, MySQL and PHP, read the following blog posts first:
To install phpMyAdmin 3.4.5deb1, please ensure the following pre-requisites are met:
- A web server – apache2 will suffice for Ubuntu 11.10
- PHP 5.2.0 or newer
- MySQL 5.0.1 or newer
Open the Terminal and issue the following commands to verify:
You will see the following message:
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
The following NEW packages will be installed:
dbconfig-common php5-gd phpmyadmin
0 upgraded, 3 newly installed, 0 to remove and 139 not upgraded.
Need to get 5,736 kB of archives.
After this operation, 20.2 MB of additional disk space will be used.
Do you want to continue [Y/n]?
Answer ‘Y’ to initiate the installation.
Then follow the prompt to make the correct selections.
- web server to reconfigure automatically: apache2
- configure database for phpmyadmin with dbconfig-common: No (this assumes you have existing databases)
If there are no existing databases, answer Yes to configure a database for phpmyadmin with dbconfig-common. Then for the next two prompts, enter the same MySQL user password (use an account with administrative access privilege), i.e. in response to the following:
- Password of the database’s administrative user
- MySQL application password for phpmyadmin
Add phpMyAdmin apache config
Scroll down until you find the include module section, and add the following line and save the file:
Restart the apache web server for the above changes to take effect
Open a web browser and enter the following URL:
Log into phpMyAdmin web based tool using one of your MySQL server user. Your existing databases should all be there.
Congratulations! You have successfully set up phpMyAdmin 3.4.5 on Ubuntu Server 11.10.