Databases

How To Install phpMyAdmin on Fedora 43/42/41/40

In this guide, we will look at how to install phpMyAdmin on Fedora Linux system. PHPMyAdmin is an open source software tool written in PHP, intended to handle the administration of MySQL over the Web interface.

Original content from computingforgeeks.com - post 4477

phpMyAdmin has support for a wide range of operations on MySQL, MariaDB, and Drizzle. It is often used to perform common Database operations (managing databases, tables, columns, relations, indexes, users, permissions, etc) through an intuitive and easy to use web interface. phpMyAdmin is installable on most major distributions of Linux, Windows systems, and on macOS.

Follow the steps below to Install phpMyAdmin on Fedora Linux system.

Install PHP and Apache web server

Apache HTTP server and PHP are required dependencies for phpMyAdmin. Install them first:

sudo dnf -y install httpd php php-cli php-php-gettext php-mbstring php-mcrypt php-mysqlnd php-pear php-curl php-gd php-xml php-bcmath php-zip

Configure httpd basic settings:

Edit the configuration file /etc/httpd/conf/httpd.conf and set:

ServerAdmin [email protected]
ServerName  example.com
ServerTokens Prod

You can optionally set Keepalive:

KeepAlive On

Enable and start httpd service:

sudo systemctl start httpd
sudo systemctl enable httpd

If you have firewalld running, allow both http and https services:

sudo firewall-cmd --add-service={http,https} --permanent
sudo firewall-cmd --reload

Confirm your installed PHP version:

$ php -v
PHP 8.4.7 (cli) (built: May  6 2025 12:31:58) (NTS gcc x86_64)
Copyright (c) The PHP Group
Built by Fedora Project
Zend Engine v4.4.7, Copyright (c) Zend Technologies
    with Zend OPcache v8.4.7, Copyright (c), by Zend Technologies

Loaded extensions can be viewed by passing -m option to the phpcommand

php -m

Set PHP timezone on the file /etc/php.ini

date.timezone = Africa/Nairobi

See a complete List of Supported Timezones.

Install phpMyAdmin on Fedora

After PHP and Apache have been installed, you can install phpMyAdmin on Fedora .

sudo dnf -y install phpMyAdmin

Check the version of phpMyAdmin installed on your Fedora.

$ rpm -qi phpMyAdmin
Name        : phpMyAdmin
Version     : 5.2.2
Release     : 1.fc42
Architecture: noarch
Install Date: Tue 20 May 2025 02:09:58 PM EAT
Group       : Unspecified
Size        : 55211038
License     : GPL-2.0-or-later AND MIT AND BSD-2-Clause AND BSD-3-Clause AND LGPL-3.0-or-later AND MPL-2.0 AND ISC
Signature   : RSA/SHA256, Wed 22 Jan 2025 09:51:18 AM EAT, Key ID c8ac4916105ef944
Source RPM  : phpMyAdmin-5.2.2-1.fc42.src.rpm
Build Date  : Wed 22 Jan 2025 09:48:37 AM EAT
Build Host  : buildvm-ppc64le-20.iad2.fedoraproject.org
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : https://www.phpmyadmin.net/
Bug URL     : https://bugz.fedoraproject.org/phpMyAdmin
Summary     : A web interface for MySQL and MariaDB
....

Limiting access to phpMyAdmin from known networks

Limit access to phpMyAdmin to your only trusted networks

sudo vi /etc/httpd/conf.d/phpMyAdmin.conf

Edit the Require ip lines – both on Line 17 and 34 of the file.

# Add your local subnet
Require ip 127.0.0.1 192.168.18.0/24

Save the changes and restart httpd service

sudo systemctl restart httpd

Access phpMyAdmin web dashboard

Access  [http://(your hostname or IP address)/phpmyadmin/] from your favorite web browser and network whitelisted.

Login with your Database user to start administering database operations from phpMyAdmin web interface.

Change Authentication Plugin for MySQL 8.0

To be able to authenticate to MySQL 8.0, login to MySQL CLI and change  Authentication Plugin.

$ mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 26
Server version: 8.0.13 MySQL Community Server - GPL

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'ph/axo>vJe;789';
Query OK, 0 rows affected (0.11 sec)

mysql> QUIT
Bye

Enjoy administering your MySQL or MariaDB database server with phpMyAdmin.

Recommended books to read:

Don’t forget to check other Fedora articles available on our website.

Related Articles

Prometheus Monitor Linux Server using Prometheus and Grafana in 5 minutes Databases Installation of MariaDB 10.6 on Ubuntu 20.04|18.04 Databases How To Install MariaDB 10.6 on Amazon Linux 2 Databases Install pgAdmin 4 on Fedora 41/40/39/38

1 thought on “How To Install phpMyAdmin on Fedora 43/42/41/40”

  1. If you get the following when you execute step 4:

    ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)

    That’s beacause you need to enter a temporary password that mysql has generated. The temporary password can be found issuing the next command:

    grep ‘A temporary password is generated’ /var/log/mysqld.log | tail -1

    Now you can copy and paste your temporary password to authenticate.

    Reply

Leave a Comment

Press ESC to close