How To Install phpMyAdmin on Ubuntu 22.04
In this guide, we will explain how to install phpMyAdmin on Ubuntu 22.04, allowing you to manage MySQL databases through a user-friendly web interface.
PhpMyAdmin is a free and open-source web-based tool written in PHP, used for managing MySQL and MariaDB databases. It provides a graphical interface for a variety of database operations, making it easier. phpMyAdmin simplifies the complex process of database management with its user-friendly web interface.
Prerequisites
It works on all Linux distributions.
Operating system used: Ubuntu 22.04
Update && Upgrade the server
To update and upgrade the package lists from the repositories, run the following command
Install the necessary packages
To set up the essential packages for phpmyadmin installation.
After Installation start and enable the service
To start and enable Apache service.
To start and enable MariaDB.
MySQL Secure Installation
Run the MySQL secure installation
Follow the prompts to set a root password and configure other security settings.
Install phpMyAdmin
To install phpmyadmin run the following command
During the installation, you can choose the webserver to configure for phpMyAdmin. Select apache2 and configure the database for phpMyAdmin.
The phpmyadmin packages must have a database installed and configured before it can be used. This can be optionally handled with dbconfig-common
. Configure the database for phpmyadmin with dbconfig-common click on YES
.
Please provide a password for phpmyadmin to register with the database server.
Now your phpmyadmin has been installed.
To create a Database and User
Login to the MySQL
Run these commands.
Configure phpMyAdmin
Edit the phpmyadmin configuration file /etc/phpmyadmin/config.inc.php
to run these commands
After setting the user, password, and database to save the file and restart the service
After setting everything up, you can access phpMyAdmin through your web browser. Here's how:
Log in using the credentials you set up
if you need to log in as an administrator, it is recommended to use the root user instead of the mysql user and password
Last updated