Install & Setup MySQL and phpMyAdmin with Apache

By | February 21, 2018

Install & Setup MySQL and phpMyAdmin with Apache

MySQL is a powerful open source Relational Database used by many dynamic websites across the internet. MySQL is most commonly used as the database.

phpMyAdmin is an open source tool used for the administration of MySQL. In addition to offering the capability to perform administration tasks such as creating, editing, or deleting databases, and managing users and permissions, phpMyAdmin provides a graphical user interface to do all of these tasks and more.

Assuming you have already installed and configured Apache with PHP5 as your web server,Here we discusssed about the steps to install MySQL and phpMyAdmin.

First of all, you need to install MySQL by run the following:

yum install mysql-server

chkconfig mysqld on

systemctl restart

Relational database management systems like MySQL and MariaDB are needed for a significant portion of web sites and applications. However, not all users feel comfortable administering their data from the command line.

To solve this problem, a project called phpMyAdmin was created in order to offer an alternative in the form of a web-based management interface

Install phpMyAdmin

Unfortunately, phpMyAdmin is not available in CentOS 7’s default repository.

phpMyAdmin is part of Extra Packages for Enterprise Linux (EPEL), which is a community repository of non-standard packages for the RHEL distribution. First, we’ll install the EPEL repository

The EPEL repository can be made available to your server by installing a special package called epel-release

yum install epel-release

you can install the phpMyAdmin package using the yum packaging system by typing:

yum install phpmyadmin

The installation will now complete. The installation included an Apache configuration file that has already been put into place. We will need to modify this a bit to get it to work correctly for our installation.

Open the file in your text editor now so that we can make a few changes:

vim /etc/httpd/conf.d/phpMyAdmin.conf

By default, the configuration for phpMyAdmin only allows access from the server on which it is installed. Find the following sections and change each IP address to the one you found

Change any lines that read Require ip or Allow from to refer to your home connection’s IP address. If you need help finding the IP address of your home connection, check out the next section. There should be four locations in the file that must be changed:

Require ip
Allow from
Require ip
Allow from

When you are finished, restart the Apache web server to implement your modifications by typing:

systemctl restart httpd.service

our phpMyAdmin installation is completed. To verify by visinting your IPaddress/phpMyAdmin, in your web browser:

To sign in, use a username/password pair of a valid MariaDB user. The root user and the MariaDB administrative password is a good choice to get started. You will then be able to access the administrative interface.

Now, you can manage Databases by PhpMyAdmin    Send article as PDF   

Leave a Reply

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