How to Install PhpMyAdmin on a Ubuntu 22.04 VPS or Dedicated Server | HostAdvice

How to Install PhpMyAdmin on a Ubuntu 22.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 22.04 server

Prerequisites

  • An Ubuntu 22.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 22.04 server if you haven’t done so.
Note
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 hosting, best 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 22.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 22.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 22.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.

In addition, 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 your server on a public network. We believe this guide will help you to manage your MySQL database better.

How To Set up a VSFTPD Server on a CentOS 7 VPS or Dedicated Server

Brief Description FTP is usually insecure exposing clear-text passwords, userna
2 min read
Avi Ilinsky
Avi Ilinsky
Hosting Expert

How To Set up a VSFTPD Server on an Ubuntu 16.04 VPS or Dedicated Server

Brief Description FTP data is usually insecure since information (usernames, pa
2 min read
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert

How to use phpMyAdmin to develop a website (without MySQL experience)

Brief description A web developer who is not well versed into coding websites f
2 min read
Idan Cohen
Idan Cohen
Marketing Expert

How to Install MySQL on a Windows Web Server Running Apache

This tutorial will show you how to install the MySQL database on a Windows serve
3 min read
Michael Levanduski
Michael Levanduski
Expert Hosting Writer & Tester
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