How to setup PhpMyAdmin on RHEL Linux

First install Mysql data base

# dnf install mysql-server
# systemctl start mysqld.service 
# systemctl enable mysqld.service 
# systemctl status mysqld.service

Install Apache web server

# dnf install httpd
# systemctl start httpd 
# systemctl enable httpd
# systemctl status httpd

Install the required packages of php

# dnf install php php-pdo php-pecl-zip php-json php-mbstring php-mysqlnd php-cli php-gd php-curl php-zip

Installing phpMyAdmin

# wget https://files.phpmyadmin.net/phpMyAdmin/5.2.1/phpMyAdmin-5.2.1-all-languages.tar.gz
# tar -zvxf phpMyAdmin-5.2.1-all-languages.tar.gz
# mv phpMyAdmin-5.2.1-all-languages /usr/share/phpmyadmin 
# mkdir /usr/share/phpmyadmin/tmp
# chown -R apache:apache /usr/share/phpmyadmin 
# chmod 777 /usr/share/phpmyadmin/tmp
# vim /etc/httpd/conf.d/phpmyadmin.conf

Alias /phpmyadmin /usr/share/phpmyadmin
<Directory /usr/share/phpmyadmin/>
AddDefaultCharset UTF-8
<IfModule mod_authz_core.c>
<RequireAny>
Require all granted
</RequireAny>
</IfModule>
</Directory>

<Directory /usr/share/phpmyadmin/setup/>
<IfModule mod_authz_core.c>
<RequireAny>
Require all granted
</RequireAny>
</IfModule>
</Directory>
# systemctl restart httpd.service

Now, open our browser and use this URL on your web page

# http://IP-Address/phpmyadmin/
# http://192.168.0.103/phpmyadmin/

Now, Login phymyadmin account using your mysql databases user name and password.

Username is your mysql databases name and Password is your database password

Leave a Reply

Your email address will not be published. Required fields are marked *