How to Install PHPMyAdmin in Ubuntu

PHPMyAdmin is a popular web-based database administration tool for MySQL database. It is used by thousands of web developers and database administrators around the world. In this article, we will look at how to install PHPMyAdmin in Ubuntu 18.04/20.04. You can also use these steps to install PHPMyAdmin in older Ubuntu versions.


How to Install PHPMyAdmin in Ubuntu 18.04/20.04

Here are the steps to install PHPMyAdmin in Ubuntu.


1. Update System Packages

Open terminal and run the following commands to update system packages.

$ sudo apt update && upgrade

Also read : How to Install MongoDB in Ubuntu


2. Install PHPMyAdmin

Run the following command to install PHPMyAdmin and its extensions.

$ sudo apt install phpmyadmin php-mbstring php-gettext

During installation, you will be asked to select a web server to run PHPMyAdmin. Select Apache2 and hit enter since it is commonly used with PHP and PHPMyAdmin.

Next, you will be asked if you want automatic or manual database setup. Select automatic database setup by selecting Yes

You will also be asked to set PHPMyAdmin password, for user phpmyadmin. Enter a strong password and note it somewhere safe.

Now, PHPMyAdmin setup will complete.

Also read : How to Use cURL to Download Files in Linux


3. Enable PHP Extensions

Run the following command to enable PHP extensions.

$ sudo phpenmod mbstring


4. Restart Apache Server

Restart Apache server to apply changes.

$ sudo service apache2 restart

Also read : How to Set or Change Time Zone in Ubuntu


5. Verify PHPMyAdmin Installation

Open browser and go to http://your_server_ip/phpmyadmin. If you have installed PHPMyAdmin on your local machine, then visit http://localhost/phpmyadmin or http://127.0.0.1/phpmyadmin

You will see the following authentication screen. Enter phpmyadmin as username and enter its password that you had set during installation step 2.

That’s it. Now PHPMyAdmin will be functional on your system. In this article, we have learnt how to easily install PHPMyAdmin in Ubuntu.

Also read : How to Implement SSL/TLS in Apache Tomcat