To install and configure phpMyAdmin on CentOS or Red Hat Enterprise Linux (RHEL) for the administration of a MySQL database server, you can use the following steps:
php
and php-mysql
packages, which are required for running phpMyAdmin:sudo yum install php php-mysql
or
sudo dnf install php php-mysql
phpMyAdmin
package using the package manager:sudo yum install phpmyadmin
or
sudo dnf install phpmyadmin
This will install phpMyAdmin and all of the required dependencies.
/etc/httpd/conf.d/phpMyAdmin.conf
file and set the Require ip
directive to allow access from your IP address. For example, to allow access from the 192.168.1.100
IP address:<RequireAny> Require ip 192.168.1.100 </RequireAny>
sudo systemctl restart httpd
Open a web browser and navigate to the http://your-server-ip/phpmyadmin
URL, replacing your-server-ip
with the actual IP address or hostname of your server. You should see the phpMyAdmin login page.
Enter your MySQL username and password, and click the "Go" button to log in to the phpMyAdmin interface.
From the phpMyAdmin interface, you can create and manage databases, tables, and users, as well as run SQL queries and perform other tasks related to MySQL administration.
Note: These instructions are intended as a basic guide for installing and configuring phpMyAdmin on CentOS or RHEL. For a more secure and robust setup, you should consider using additional security measures such as SSL encryption, password authentication, and firewall rules.