How to Install phpMyAdmin on Ubuntu 18.04

Install phpMyAdmin on Ubuntu 18.04

In this tutorial we are going to learn how to install phpMyAdmin on Ubuntu 18.04. We will also install and configure its prerequisites. phpMyAdmin is one of the most popular and widely used web-based database management tools. It’s a free and open source PHP application that allows the users to manage single or multiple SQL database servers locally or on a remote server using a web browser (GUI). phpMyAdmin is very handy and useful. We can easily create, rename, delete and edit databases, tables or fields, execute SQL commands, import and export tables, create and modify users, etc., all via an easy-to-use GUI.

I recommend to use a minimal Ubuntu server setup as a basis for the tutorial, that can be a virtual or a root server image with an Ubuntu 18.04 Bionic Beaver minimal install from a web hosting company or you use our minimal server tutorial to install a server from scratch.

Install phpMyAdmin on Ubuntu 18.04

Step 1. First, ensure your system and apt package lists are fully up-to-date by running the following:

apt-get update -y
apt-get upgrade -y

Step 2. Installing LAMP on Ubuntu 18.04.

You should check out this LAMP stack install tutorial for Ubuntu 18.04 LTS, if you haven’t installed LAMP yet.

Step 3. Installing phpMyAdmin on Ubuntu 18.04.

Once LAMP are installed, we can go ahead and install phpMyAdmin. The package is included in the official Ubuntu 18.04 repository and it can be easily installed with the command below:

sudo apt install phpmyadmin

During installing, you’ll be asked to choose the web server that should be automatically configured to run phpMyAdmin. In our case, it is Apache webserver.

Install phpMyAdmin on Ubuntu 18.04

Step 4. Configure Firewall for phpMyAdmin.

If you have a system firewall enabled and running, you need to open the ports 80 and 443 to allow client connection requests to apache web server:

sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw reload

Step 5. Access phpMyAdmin dashboard.

Now, you can access the phpmyadmin dashboard by navigating to http://server-ip-address/phpmyadmin/ from your browser. You should see the following screen. Enter the MariaDB/MySQL ‘root’ user name and its password.

Install phpMyAdmin on Ubuntu 18.04

Congratulation’s! You have successfully install and configured phpMyAdmin on your Ubuntu 18.04 server. Thanks for using this tutorial installing phpMyAdmin on Ubuntu 18.04 LTS (Bionic Beaver) system.