Skip to content

How to install phpMyAdmin on CentOS with LNMP

homepage-banner

How to Install phpMyAdmin on CentOS

Introduction

phpMyAdmin is a free and open source web-based tool for managing MySQL and MariaDB databases. It provides an easy-to-use interface that enables users to perform various tasks such as creating, modifying, and deleting databases, tables, and fields. This article will guide you through the process of installing phpMyAdmin on CentOS.

Prerequisites

Before proceeding with the installation process, you must have the following prerequisites:

  • A CentOS server with root access
  • Apache web server installed and running
  • PHP installed and running
  • MySQL or MariaDB installed and running

Installing phpMyAdmin

To install phpMyAdmin on CentOS, follow the steps below:

  1. Open a terminal window and log in as root.
  2. Run the following command to install the EPEL repository:

    yum install epel-release
    
  3. Once the repository is installed, run the following command to install phpMyAdmin:

    yum install phpMyAdmin
    
  4. After the installation process is complete, open the phpMyAdmin configuration file using your preferred text editor:

    vim /etc/httpd/conf.d/phpMyAdmin.conf
    
  5. Uncomment the following line by removing the ‘#’ symbol at the beginning of the line:

    # Require ip 127.0.0.1
    
  6. Save and close the file.

  7. Restart the Apache web server:

    systemctl restart httpd
    
  8. Open a web browser and navigate to your server’s IP address followed by ‘/phpMyAdmin’. For example, if your server’s IP address is 192.168.1.100, navigate to:

    <http://192.168.1.100/phpMyAdmin>
    
  9. You will be prompted to enter your MySQL/MariaDB username and password. Once you have entered them, click on the ‘Go’ button.

Conclusion

In conclusion, phpMyAdmin is a powerful tool for managing MySQL and MariaDB databases. By following the steps outlined in this article, you should now be able to install phpMyAdmin on CentOS and start using it to manage your databases. If you encounter any issues during the installation process, refer to the official phpMyAdmin documentation for further guidance.

Leave your message