By default, if you want to access the MariaDB database, then you have to access it using the CLI. However, this method is a bit difficult, especially for those who are not used to the CLI. So you need an application that can display the database in the GUI, and you can interact with the database using the application. One application that is often used is the PHPMyAdmin application.
Problem
How to install PHPMyAdmin on Linux?
Solution
phpMyAdmin is an open-source, free MySQL and MariaDB administration tool, and as of this writing (November 2025), this application has version 5.2.3. This application is a web application and is written using PHP. Before installing the PHPMyAdmin application, you must have installed the database on your Linux server, and you must have provided a password for the database. Here is how to install the PHPMyAdmin application on Linux, based on the distro:
Ubuntu/Debian
sudo apt update
sudo apt install phpmyadmin php-mbstring php-zip php-gd php-json php-curl
RockyLinux/AlmaLinux/CentOS
yum install httpd
yum install php-phpmysql
OpenSUSE
sudo zypper install apache2
sudo zypper install php7 php7-mysql apache2-mod_php7 phpMyAdmin
This article will install PHPMyAdmin on Ubuntu 24.04 and run the command below:
sudo apt update
sudo apt install phpmyadmin php-mbstring php-zip php-gd php-json php-curl
During installation, a pop-up will appear as below:

Select the web server used, and I use the Apache web server, and click OK. Then there will be another pop-up like below:

Choose Yes, and the installation will continue, but after that, you must enter the password for phpadmin as in the image below:

Enter your password, click Ok, and then there will be an email confirmation as in the image below:

Enter your password again, click Ok, and the installation process will continue. And you have to wait until the installation process is complete. After that, open your browser and type the URL below:
http;//your_ip_server/phpmyadmin
There should be a display like the image below:

If there is no display like the one above, it looks like you have to open port 80 on your server. Enter your username and password in your MySQL/MariaDB Database, and if there are no errors, then there will be a display like in the image below:

To see all the databases in your database, click Database as shown in the image below:

You can also perform queries in the SQL section, as in the image below:

And you can see the history of queries that you have done in PHPMyAdmin in the console section, as in the image below:

And in the console section, you can also perform queries by pressing Ctrl+Enter after you write the query.
Note
It is highly recommended to restrict access to the PHPMyAdmin application. Therefore, this application should only be allowed on certain IPs, for example, office IPs. And you can make these restrictions in the /etc/apache2/conf-available/phpmyadmin.conf file in the /usr/share/phpmyadmin section. For example, if you want only IP 192.168.56.1 to be able to access this application, then add the script below:
# Limit IP
Order Deny,Allow
Deny from All
Allow from sysadminpedia.com
Allow from 192.168.56.1
Allow from 127.0.0.1

After that, restart your webserver. Now you can’t open the phpMyAdmin application except at the IP you have specified in the phpmyadmin.conf file
References
en.wikipedia.org
digitalocean.com
tutorialspoint.com
synaptica.info

