How to Install PhpMyAdmin in Ubuntu 22.04

In this guide, we will demonstrate how PhpMyAdmin is installed on a Ubuntu 22.04 system. PhpMyAdmin requires a standalone Database or as part of the LEMP stack, installed and running on the system beforehand.

Prerequisites:

Server with Nginx, PHP, and MariaDB. You can find our LEMP Installation guide here.

Installing PhpMyAdmin

apt install phpmyadmin

Output:

root@vps:~# apt install phpmyadmin
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
dbconfig-common dbconfig-mysql icc-profiles-free javascript-common
libjs-jquery libjs-openlayers libjs-sphinxdoc libjs-underscore libzip5
php-bz2 php-google-recaptcha php-mysql php-phpmyadmin-motranslator
php-phpmyadmin-shapefile php-phpmyadmin-sql-parser php-phpseclib
php-psr-cache php-psr-container php-psr-log php-symfony-cache
php-symfony-cache-contracts php-symfony-expression-language

Create Symbolic Link

Create a symbolic link from the installation files to Nginx's document root directory.

sudo ln -s  /usr/share/phpmyadmin /var/www/html/phpmyadmin

Enter it into your browser's address bar to check that phpmyadmin is installed. http://yourserver-ip-address/phpmyadmin/. You should see a page similar to the below one.

image

Done!