How to Install PhpMyAdmin on a Ubuntu 18.04 VPS or Dedicated Server

How to Install PhpMyAdmin on a Ubuntu 18.04 VPS or Dedicated Server

phpMyAdmin is one of the most popular open-source database administration software written in PHP.  The portable web application can manage both MySQL and MariaDB.

Executing commands and managing MySQL database from the command line is not very intuitive especially if you are performing a lot of database tasks. This is where phpMyAdmin comes in to help you manage tables, columns, indexes, users, permissions and more using a graphical user interface.

MySQL is quickly replacing commercial database management system and is considered as one of the best database software for a production environment. MySQL and phpMyAdmin are the de facto standards for managing most modern web applications databases.

In this guide, we will show you how you can install phpMyAdmin on your Ubuntu 18.04 server

Prerequisites

  • An Ubuntu 18.04 VPS plan
  • A non-root user with sudo privileges
  • MySQL database community server. You can run the command below to install MySQL on your Ubuntu 18.04 server if you haven’t done so.

Special note: If you haven’t yet purchased a hosting plan, we recommend that you consult with HostAdvice’s expert and user reviews before doing so. Go to HostAdvice’s best PHP hostingbest VPS hosting, or best Linux Hosting to find the best rated web hosts in these categories.

 

$ sudo apt-get update
$ sudo apt-get install mysql-server

Step 1:
Install phpMyAdmin

Ubuntu maintains a central repository for most packages and we can install phpMyAdmin using the command below:

$ sudo apt-get install phpmyadmin

Once you are prompted to confirm the installation, press Y and then Enter.

Step 2:
Configure the phpMyAdmin installation

You will be taken through a series of steps to configure your phpMyAdmin installation. The first step prompts you to choose a server from apache2 and Lighttpd. Choose apache2, then click TAB and Enter to proceed as shown below:

On the next screen, you will be prompted to configure a database that phpMyAdmin will use for administration purposes. Select ‘Yes’ and press Enter to proceed.

Next, create an application password for phpMyAdmin. Kindly type a strong password with a mix of lower case letters, upper case, numbers and symbols for security purposes. Then press TAB and and Enter to proceed as shown below:

You will be prompted to confirm the password one more time as shown below.

Press TAB then press Enter to proceed.

If you miss any of the steps below, you can reconfigure phpMyAdmin by running the command below:

$ sudo dpkg-reconfigure phpmyadmin

Also if you want to completely remove phpMyAdmin and start all over, run the command below:

$ sudo apt-get purge phpmyadmin

Step 3:
Create a symbolic link

In order to access phpMyAdmin via a browser, you need to create a symbolic link on the path /etc/apache2/conf-enabled/. You will get a 404 error if you skip this step.

You will need to run the three commands below to create the link on your Ubuntu 18.04 server:

$ sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
$ sudo a2enconf phpmyadmin.conf
$ sudo service apache2 reload

Step 4:
Test the installation

If you followed the above steps, your phpMyAdmin installation should be successful. You can visit the url http://111.111.111.111/phpmyadmin on your server to test the installation. Remember to change the IP address with your public IP address associated with your Ubuntu 18.04 server or domain name. You should see a screen similar to the one below

Enter your username and password to proceed. If the details are correct, you will get the below phpMyAdmin User Interface and you can now manage your database by creating tables, adding fields, indexes, inserting, updating and deleting record.

Conclusion

You have now configured phpMyAdmin on your Ubuntu 18.04 server and managing your databases will be a breeze. For security reasons, never configure your websites to run using the root user of your MySQL database.

Also, you should consider installing an SSL certificate to protect your phpMyAdmin login details from landing into the wrong hands especially if you are logged into to your server on a public network. We believe this guide will help you to manage your MySQL database better.

Check out the top 3 Dedicated server hosting services:

Hostinger
NZ$4.85 /mo
Starting price
Visit Hostinger
Rating based on expert review
  • User Friendly
    4.7
  • Support
    4.7
  • Features
    4.8
  • Reliability
    4.8
  • Pricing
    4.7
IONOS
NZ$1.62 /mo
Starting price
Visit IONOS
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.0
  • Features
    4.5
  • Reliability
    4.5
  • Pricing
    4.3
Ultahost
NZ$4.06 /mo
Starting price
Visit Ultahost
Rating based on expert review
  • User Friendly
    4.3
  • Support
    4.8
  • Features
    4.5
  • Reliability
    4.0
  • Pricing
    4.8

How to Backup Your MySQL Database on an Ubuntu 18.04 VPS or Dedicated Server

This article shows you how to back up a MySQL database on a Linux Ubuntu 18.04 s
less than a minute
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert

How to Install phpMyAdmin on a CentOS 7 VPS or Dedicated Server

Learn how to setup phpMyAdmin on your CentOs 7 VPS server and manage your MySQL/
less than a minute
Max Ostryzhko
Max Ostryzhko
Senior Web Developer, HostAdvice CTO

How to Install MYSQL 8.0 and Create a Database on an Ubuntu 18.04 Linux VPS

This article shows how to install MySQL 8.0 on an Ubuntu 18.04 VPS. In addition,
less than a minute
Michael Levanduski
Michael Levanduski
Expert Hosting Writer & Tester

How to Disable MySQL 5 "Strict Mode" on an Ubuntu 18.04 VPS or Dedicated Server

How to Disable MySQL Strict Mode on MySQL 5.6 Running on an Ubuntu 18.04 VPS.
less than a minute
Idan Cohen
Idan Cohen
Marketing Expert
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top