Press Ctrl/Cmd + P to print
or save as PDF

Quick phpMyAdmin Installation On Linux VPS Server For Ubuntu 18.04

If you owned a Linux VPS server and needed phpMyAdmin on your system, you will have to manually install it on the server. phpMyAdmin is a GUI open-source tool used to manage MySQL databases. For this installation guide, the Linux distribution that will be used is Ubuntu 18.04.

Step 1: Installation

Before installing, make sure you have the following requirements installed on your VPS.

  • Apache
  • MySQL
  • PHP

Also, make sure you are connected to the server through a SSH client.

Onto the installation process, firstly, open a terminal, then type in the following command and run it

sudo apt-get install -y phpmyadmin php-mbstring php-gettext

This command will help you install the required PHP extensions and phpMyAdmin packages. Midway through the installation, it will prompt you to select a web server for the phpMyAdmin configuration. To pick Apache, press Space and a * symbol will appear next to “apache2”. This symbol indicates which webserver is currently selected. Press Enter to confirm and proceed with the installation.

After that, select “Yes” when it prompts you to configure the database with dbconfig-common.

Finally, it will prompt you to set a password for phpMyAdmin. Make a complex password of your own, then verify it, and your phpMyAdmin installation will be completed.

Step 2: Configuration

After finishing the installation, a bit of a configuration on the users and permissions will need to be done, for phpMyAdmin to be practical enough to manage the MySQL databases.

For starters, log in to the MySQL command line as the root user to manage MySQL users with this command

sudo mysql -u root -p

After accessing the MySQL root account, you can grant permissions to phpMyAdmin by using the following command line by line.

GRANT ALL PRIVILEGES ON *.* TO ‘phpmyadmin’@’localhost’;
FLUSH PRIVILEGES;
EXIT

Step 3: Verifying Installation

To make sure your installation is completed, go to the following link using a browser.

http://insert-server-IP/phpmyadmin

Replace “insert-server-IP” with your server’s IP addresses. In the case of using localhost, replace “insert-server-IP” with “localhost”, and it will direct you to a phpMyAdmin login page. Just log in with the username and password you had set. With this, your phpMyAdmin installation is now completed.