How to install phpMyAdmin on CentOS 7

How to install phpMyAdmin on CentOS 7

Install phpMyAdmin on CentOS 7

phpMyAdmin is one of the best web interface based database administration tools for MySQL. The phpMyAdmin user allows you to easily interact with a MySQL database. Provides the most useful features for interacting with a MySQL database. In this tutorial you will learn how to install phpMyAdmin on CentOS 7.

Prerequisites

1. Before you begin installing phpMyAdmin on CentOS 7, you need a non-root user account on a server with sudo privileges.

2. Make sure the LAMP stack is installed on the server. If not, use the following link to install LAMP. How to install LAMP stack on CentOS7

1. Install phpMyAdmin on CentOS 7

Since phpMyAdmin is not available in the CentOS core repository, you need to add the EPEL repository by running the following command:

sudo yum install epel-release

You can now install phpMyAdmin by entering the following command: It also installs any required dependencies.

sudo yum install phpmyadmin

2. Configure phpMyAdmin

If you access phpMyAdmin from a remote location, you need to configure some settings. Apache configuration file created during installation. By default, all connections except localhost are denied, so you need to modify the configuration file and add the allowed IP addresses.

To get the IP address, enter the following command in a terminal:

curl ipinfo.io/ip

Edit the configuration file by entering the following command:

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

Replace Require ip 127.0.0.1 with Require ip YOUR_IP_ADDRESS

The following code shows an example.

# Apache 2.4

    Require ip 192.168.43.103 Require ip ::1 

Restart Apache by entering the following command:

sudo systemctl restart httpd

You can now go to the following link and log in to phpMyAdmin. https: // YOUR_DOMAIN_NAME / phpmyadmin Or on the desktop http://127.0.0.1/phpmyadmin/.

Note: Remember that you need to know the database username and password. If you are not sure, follow these steps to create a user with permissions.

Install phpMyAdmin on CentOS-Log in to phpMyAdmin Install phpMyAdmin on CentOS – login to phpMyAdmin

3. Create database user (optional)

Open a MySQL shell by entering the following command

sudo mysql

Create a new user by entering the following command

CREATE USER 'user_name'@'localhost' IDENTIFIED BY 'password';

Grant all permissions to the created user by typing:

GRANT ALL PRIVILEGES ON *.* TO 'user_name'@'localhost' WITH GRANT OPTION;

Enter and exit the MySQL shell

exit;

You can now go to the following link and log in to phpMyAdmin. https: // YOUR_DOMAIN_NAME / phpmyadmin Or on the desktop http://127.0.0.1/phpmyadmin/.

Conclusion

You have successfully installed phpMyAdmin on CentOS 7. If you have any questions about this, don’t forget to comment below.

Sidebar