How to Install phpMyAdmin in Ubuntu 22.10
In this guide, we will demonstrate how phpMyAdmin is installed on a Ubuntu 22.10 system. phpMyAdmin requires a standalone Database and/or as part of the LEMP or LAMP stack, installed and running on the system beforehand.
Prerequisites:
- A server running Ubuntu 22.10 with Apache (or Nginx), PHP, and MariaDB.
Installing phpMyAdmin with Apache
Installing phpMyAdmin is very easy with Apache and involves just a single command,
apt install phpmyadmin
Output:
root@crown:~# 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
Once installed, phpmyadmin will be available at, http://yourserver-ip-address/phpmyadmin/
Running phpMyAdmin with Nginx
Installing phpMyAdmin under Nginx requires an additional step beyond the phpMyAdmin package installation, first lets install the phpMyAdmin package,
apt install phpmyadmin
Output:
root@crown:~# 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
Next, If you wish to access phpMyAdmin without setting up a custom vHost, a custom path can be setup with the use of a symbolic link,
Create a symbolic link from the installation files to Nginx's document root directory.
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.
Done!