Manage MySQL with phpMyAdmin on Ubuntu

run multiple websites

Assignment for new students: How do you manage MySQL databases?

While many find it comfortable using the command console to manage MySQL databases, others might not find that appealing, especially for new students.

Interacting with MySQL databases from the command console isn’t for someone who just started learning the basics. That’s why a tool called phpMyAdmin was created.

phpMyAdmin was created so users and new students can interact with MySQL database servers through a web browser. This brief tutorial is going to show you how to install and use phpMyAdmin on Ubuntu systems.

Step 1 : Complete Prerequisites

Before you begin, there are some prerequisites that must be met. You must first install the LAMP stack on Ubuntu, since phpMyAdmin depends on it to function.

This post shows how to install the LAMP stack on Ubuntu:

Step 2 : Install phpMyAdmin

phpMyAdmin can be installed from the default Ubuntu repositories. All one has to do is run the commands below.

sudo apt-get install -y phpmyadmin

After you run the above command you’ll be prompted with a message below:

Please choose the web server that should be automatically configured to run phpMyAdmin.
Web server to reconfigure automatically:

Choose apach2  — the first option using the space-bar on your keyboard and continue

On the next screen when prompted with the message below, choose Yes

The phpmyadmin package must have a database installed and configured
before it can be used. This can be optionally handled with dbconfig-common. │
If you are an advanced database administrator and know that you want to
perform this configuration manually, or if your database has already │
been installed and configured, you should refuse this option. Details on │
what needs to be done should most likely be provided in /usr/share/doc/phpmyadmin. Otherwise, you should probably choose this option.
Configure database for phpmyadmin with dbconfig-common?

Choose Yes

You’ll then be prompted again to create and confirm a password for phpMyAdmin application.

After that, phpMyAdmin will be installed.

Finally, enable php module encrypt by running the commands below.

sudo phpenmod mcrypt

Restart Apache2 and you’re done.

sudo systemctl restart apache2

Open your browser and browse to the machine IP or hostname followed by phpmyadmin


You’l see the logon page for phpMyAdmin as shown below.

phpmyadmin logon page on ubuntu

User the root password you created for phpMyAdmin to logon. Username is root.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.