---
title: "Setup phpMyAdmin on Linux (AlmaLinux)"
source: "https://docs.nexcess.com/hosting/server-administration/database-management/phpmyadmin/setup-on-almalinux/"
description: "Our helpful guide shows you how to install phpMyAdmin on AlmaLinux to easily manage your MariaDB or MySQL databases. "
vertical: "Hosting"
date: "2024-09-11"
last_modified: "2026-07-27"
---

# Setup phpMyAdmin on Linux (AlmaLinux)

## **Introduction**

This guide shows you how to install and configure phpMyAdmin on AlmaLinux for **self-managed servers** at Liquid Web. [phpMyAdmin ](https://docs.nexcess.com/hosting/server-administration/database-management/phpmyadmin/)is a web-based application that makes managing [MariaDB and MySQL databases](https://docs.nexcess.com/hosting/server-administration/database-management/mariadb-mysql/) easier. Perform most database tasks from your browser without the need of command-line tools.

This is useful if you want:

- A simple interface for creating, modifying, or deleting databases and tables.
- Tools for running SQL queries, importing/exporting data, and managing users.
- Easier database administration without needing additional desktop software.

## **Prerequisites**

Before you start, make sure you have:

- AlmaLinux 8 is installed on your Liquid Web server.
- Root or sudo access via SSH.
- A working LAMP stack (Linux, Apache, MySQL/MariaDB, PHP). [Learn how to install a LAMP stack on AlmaLinux.](https://www.liquidweb.com/blog/install-lamp-almalinux/)

## **Installation Steps**

1. [Connect to your server using SSH](https://docs.nexcess.com/hosting/server-administration/linux/logging-into-your-server-via-secure-shell-ssh/)
2. Clean cached package data and update your system:

```
`sudo dnf clean all`
`sudo dnf update`
```

3. Enable EPEL and REMI repositories because phpMyAdmin is not available in the default AlmaLinux repos.

```
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
```

Potential repository compatibility issues

Installing from EPEL or REMI on a production server can cause compatibility issues. Test on a staging server first.

4. Install phpMyAdmin and its dependencies by running the following command:

```
`sudo dnf --enablerepo=remi install phpMyAdmin`
```

  
Here is the output:

```
[root@test ~]# sudo dnf --enablerepo=remi install phpMyAdmin

Remi's RPM repository for Enterprise Linux 8 - x86_64                                                                                                                                                         2.0 MB/s | 3.6 MB     00:01    

Remi's Modular repository for Enterprise Linux 8 - x86_64                                                                                                                                                     765 kB/s | 927 kB     00:01    

Safe Remi's RPM repository for Enterprise Linux 8 - x86_64                                                                                                                                                    1.6 MB/s | 2.0 MB     00:01    

Last metadata expiration check: 0:00:01 ago on Monday 12 August 2024 09:37:46 AM EDT.

Dependencies resolved.

==============================================================================================================================================================================================================================================

 Package                                              Architecture                                    Version                                                                        Repository                                          Size

==============================================================================================================================================================================================================================================

Installing:

 phpMyAdmin                                           noarch                                          5.2.1-1.el8.remi                                                               remi                                               8.9 M

Installing dependencies:

 php-process                                          x86_64                                          7.2.24-1.module_el8.3.0+2010+7c76a223                                          appstream                                           83 k

Transaction Summary

==============================================================================================================================================================================================================================================

Install  2 Packages

Total download size: 9.0 M

Installed size: 48 M

Is this ok [y/N]: y

Downloading Packages:

(1/2): php-process-7.2.24-1.module_el8.3.0+2010+7c76a223.x86_64.rpm                                                                                                                                           469 kB/s |  83 kB     00:00    

(2/2): phpMyAdmin-5.2.1-1.el8.remi.noarch.rpm                                                                                                                                                                 4.1 MB/s | 8.9 MB     00:02    

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Total                                                                                                                                                                                                         3.6 MB/s | 9.0 MB     00:02     

Running transaction check

Transaction check succeeded.

Running transaction test

Transaction test succeeded.

Running transaction

  Running scriptlet: phpMyAdmin-5.2.1-1.el8.remi.noarch                                                                                                                                                                                   1/1 

  Preparing        :                                                                                                                                                                                                                      1/1 

  Installing       : php-process-7.2.24-1.module_el8.3.0+2010+7c76a223.x86_64                                                                                                                                                             1/2 

  Installing       : phpMyAdmin-5.2.1-1.el8.remi.noarch                                                                                                                                                                                   2/2 

  Running scriptlet: phpMyAdmin-5.2.1-1.el8.remi.noarch                                                                                                                                                                                   2/2 

  Verifying        : php-process-7.2.24-1.module_el8.3.0+2010+7c76a223.x86_64                                                                                                                                                             1/2 

  Verifying        : phpMyAdmin-5.2.1-1.el8.remi.noarch                                                                                                                                                                                   2/2 

Installed:

  php-process-7.2.24-1.module_el8.3.0+2010+7c76a223.x86_64                                                                         phpMyAdmin-5.2.1-1.el8.remi.noarch                                                                        

Complete!

[root@test ~]#
```

5. Access the phpMyAdmin using your MariaDB / MySQL credentials (for example, root) via the GUI available at: http://your-server-ip/phpMyAdmin. Replace your-server-ip with your server’s IP address or domain name. For example, the URL you use may resemble the http://192.168.1.100/phpMyAdmin URL.

6. Once logged in, you should see the phpMyAdmin dashboard.

## **How to allow access to phpMyAdmin from a specific IP**

1. Open the Apache includes file for phpMyAdmin:

```
sudo nano /etc/httpd/conf.d/phpMyAdmin.conf
```

2. Add the IP restriction code:

```
<Directory /usr/share/phpMyAdmin/>

    <IfModule mod_authz_core.c>

        Require ip 127.0.0.1 192.168.1.100

    </IfModule>

</Directory>
```

Allow Only Trusted IPs

List multiple IPs separated by spaces. Only allow trusted IPs to keep your server secure.

3. Save and exit (CTRL+O, then CTRL+X).
4. Check Apache configuration:

```
sudo httpd -t
```

5. Restart Apache

```
sudo systemctl restart httpd
```

## **How to update phpMyAdmin**

1. Check for updates

```
sudo dnf update phpmyadmin
```

2. Apply updates if available:

```
sudo dnf update phpmyadmin
```

3. Restart Apache

```
sudo systemctl restart httpd
```

## **Uninstalling phpMyAdmin**

1. Uninstall phpMyAdmin

```
sudo dnf remove phpmyadmin
```

2. (Optional) Remove its Apache configuration:

```
sudo rm /etc/httpd/conf.d/phpMyAdmin.conf
```

3. Restart Apache

```
sudo systemctl restart httpd
```

## **Using phpMyAdmin**

Once installed, phpMyAdmin provides the following features:

- [**Create databases**](https://www.liquidweb.com/blog/how-to-create-a-mysql-database-in-cpanel/) – Click **New**, enter a name, and choose collation.
- [**Create tables**](https://www.liquidweb.com/blog/creating-tables-in-a-database-with-phpmyadmin/) – Define a table name and columns within a database.
- [**Run SQL queries**](https://www.liquidweb.com/blog/running-sql-queries-on-a-database-with-phpmyadmin/) – Use the **SQL** tab to execute custom queries.
- [**Backup databases**](https://www.liquidweb.com/blog/exporting-databases-and-tables-with-phpmyadmin/) – Use **Export** to save SQL or CSV files.
- [**Restore databases**](https://docs.nexcess.com/hosting/server-administration/database-management/mariadb-mysql/restoring-a-mysql-database-from-a-backup/) – Use **Import** to upload backups.
- [**Manage users**](https://docs.nexcess.com/hosting/control-panel/whm/cpanel/database-management/deleting-a-user-from-a-database-or-account-in-cpanel/) – Use **User accounts** to add or remove database users and assign privileges.

## **Troubleshooting & FAQs**

How can I reset my MariaDB root password?You can reset your MariaDB root password by starting MariaDB with the –skip-grant-tables option and then updating the password from the MySQL shell.

What should I check if phpMyAdmin is not loading?Ensure that Apache is running and that ports 80 (HTTP) and 443 (HTTPS) are open in the firewall. You can check that by running:

```
sudo systemctl status httpd
```

If you want to add the standard HTTP and HTTPS ports, run the following:

```
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload
```

Could SELinux be causing access issues with phpMyAdmin?Yes. If SELinux is enforced, Apache may be blocked from connecting to the database. You can allow access with this command:

```
sudo setsebool -P httpd_can_network_connect_db 1
```

## **About your phpMyAdmin installation on Linux and optimal hosting with Liquid Web**

Installing phpMyAdmin on AlmaLinux provides a **user-friendly way to manage databases**. On self-managed servers, you are responsible for updates, security, and performance.

Choosing the right [**Liquid Web hosting plan**](https://www.liquidweb.com/hosting/) ensures your server runs smoothly. Liquid Web provides **reliable servers, expert support, and flexible options** to keep your phpMyAdmin setup secure and efficient.– {Note} For Ubuntu servers, refer to [*How to install phpMyAdmin on Ubuntu* ](https://www.liquidweb.com/blog/install-phpmyadmin-ubuntu-18-04/)for detailed instructions.
