phpMyAdmin is a popular free and open source administration tool for MySQL and MariaDB. It is most commonly used by Linux users and web hosting businesses as an offering for database management to clients. The tool is also popular for local development as well.
This tutorial will walk you through how to install phpMyAdmin on Ubuntu 20.04 LTS.
How to Install phpMyAdmin on Ubuntu 20.04
phpMyAdmin can be easily installed using the apt package installer by using this command.
sudo apt-get install phpmyadmin
Eventually, during the installation you will be prompted to specify the web server that you are using. For the purposes of this tutorial and the screenshots below, it will be apache2. However, select the one that you are using.
Next, the installation will ask to configure the database for phpMyAdmin. By selecting 'Yes' the database will be automatically configured after you provide a password. If you would not like the installer to automatically configure the database, select 'No'.
Below is the prompt for the password if you had selected 'Yes'.
After clicking 'No' or entering the password for the automatic database configuration (shown above) the installation will complete shortly.
To prevent errors or issues accessing phpMyAdmin, create a symbolic link with the below command.
sudo ln -s /usr/share/phpmyadmin /var/www/html
And then restart your web server.
sudo systemctl restart apache2
Once the installation is complete you can now access phpMyAdmin using the appropriate URL (note: for installs on a VPS/server, replace '<your_server_ip' with the IP Address to access your VPS or server).
- http://localhost/phpmyadmin (for local installs)
- http://<your_server_ip>/phpmyadmin (for installs on a VPS/server)
And... it is that simple. phpMyAdmin is now installed and you will be able to manage your databases.
Should you have any trouble, send me a message and I'll do my best to help out.