How to Setup phpMyAdmin on Ubuntu 14.04.

phpMyAdmin Apache Ubuntu Installation MySQL


phpMyAdmin is a free software written in PHP, intended to handle the administration of MySQL over the Web. phpMyAdmin comes with a wide range of tools for managing MySQL databases.

Before we can install phpMyAdmin you need to install LAMP (Linux, Apache, MySQL and PHP) stack. If you haven't already, you can install LAMP stack by following our tutorial on Installing LAMP stack on Ubuntu 14.04.

Install phpMyAdmin

We can start the installation by updating our apt-get package repository so we will get the latest version of phpMyAdmin. Run the following commands to update apt-get.

sudo apt-get update
sudo apt-get upgrade

Now we can install phpMyAdmin by using the following command. 

sudo apt-get install phpmyadmin

You will be asked few questions during the installation to configure phpMyAdmin. Select the following answers.

  • When asked to select the web server that should be automatically configured to run phpMyAdmin. Select apache2. While apache2 is highlighted press "SPACE" or click apache2 option to select apache2.
  • Select yes to configure PHPMyAdmin database with dbconfig-common. 
  • Enter your MySQL root password when asked to enter the password of the database's administrative user.
  • Finally, you will be prompted to enter and confirm a password for phpMyAdmin. This will be used to login to phpMyAdmin web interface.  

Once the configuration is completed, we need to enable PHP mcrypt extension. We can do that by running the following command:

sudo php5enmod mcrypt

We can restart apache to load changes we have made, we can restart apache by typing: 

sudo service apache2 restart

Access phpMyAdmin web interface

You can now access phpMyAdmin by going to your server's domain or public IP address and add /phpmyadmin/ to the end. It should look like this:


Now you should see a page that looks similar to this image.

phpMyAdmin login page

You can now log in using the username root and the password that you entered when installing phpMyAdmin.

    No comments found for this tutorial, be the first to leave a comment!

Last updated on
Aug 01, 2015