How to Install phpMyAdmin on CentOS 7 – Google Cloud
Welcome back to shortlearner.com, in our previous post we learn how to install PHP in CentOS.
today in this post we will see how to install phpMyadmin on CentOS with the help of google cloud.
so before start this tutorial we should know some basic terms about phpMyadmin, centOS and google cloud.
What is phpMyadmin
so phpMyadmin is an open-source tool, which is used to administrate MySQL over the web interface.
phpMyadmin is one of the best GUI(Graphical User Interface) base database Management platform .
it is also used in MariaDB Database management. phpMyadmin is available in more than 78 languages.
What is CentOS
CentOS is a Community Enterprise Operating System. It is an open-source platform for non-productive developmental work.
For production concern, those works can be migrated to RHEL (Red Hat Enterprise Linux) Linux distribution platform.
What is Google Cloud
Google Cloud Platform offers services for compute, storage, networking, big data, machine learning and the internet of things (IoT),
as well as cloud management, security and developer tools.
Features of phpMyadmin
provides compatibility to Create , Alter, Add, Drop, Rename , Import tables from CSV and SQL and Export tables from CSV, SQL, XML, PDF, etc.
we can easily manage database, tables, fields, columns, indexes, relations, permission, etc.
it can works with different operating systems and makes complex queries easier by using its predefined functions.
You can create PDF graphics of database layout. You can also search globally in a database or subset of it.
phpMyAdmin can administrate multiple servers.
Also Read :
Also Read :
Password and Confirm Password Validation Using JavaScript
PHP Login Script With Remember me.
Change password using javascript, php and mysqli.
Check Email is Already Registered in Database using Ajax and JavaScript.
Before Installation
Before the installation process of phpmyadmin make sure you have already installed these below stuff.
Apache Web Server – We need to install Apache! Check out our article Install Apache on CentOS 7.
PHP – Then we need to install PHP! Check out our article Install PHP on CentOS.
MySQL – Then we need to install MySQL! Check out our article Install MySQL on CentOS 7.
Step 1: VM Setup
so in the very first step logged in to your google cloud account and select the Compute Engine option from the menu.
follow the below image for better understanding.
Now we can see VM instances in Compute Engine. Click on that as shown in below image.
so we just click on the open in browser window and than we will see terminal there. follow the below commands on the terminal.
Step 2: Adding the EPEL Repository
before adding this repository we should take an small overview of EPEL.
so basically EPEL is Extra Package for Enterprise Linux.
which creates, maintains, and manages a high-quality set of additional packages on CentOS. EPEL has an epel-release package that includes GPG
keys for package signing and repository information.
just follow the below command in the terminal for add this repository
sudo yum install epel-release
Step3 : Install PhpMyAdmin
we have enable EPEL Repository ,now we have to install phpmyadmin by using followinng command.
sudo yum install phpmyadmin
Step 4 : Configuration
so for doing configuration first of all we need to have grant remote access.
We are going to make changes in the config file.
For that, we can get into the config file by using the below command.
vim /etc/httpd/conf.d/phpMyAdmin.conf
once the command is executed we will see the below lines which is shown in the below image.
Step 5 : Edit in phpmyadmin.conf file
In the above image, wecan see the line Require ip. The default value will be 127.0.0.1.
we need to replace the IP string with our machine IP.
- To update the change , press “i”.
- Replace that “Require ip” with the IP of your machine.
- Saving the changes made in the config file, enter “:wq“.
- Then exit from the phpMyAdmin.conf file by pressing ESC Key.
the changes are updated in the phpMyAdmin.conf file.
Step 6 : Restart the Apache Web Server
Now we need restart the apache web server to sync up the updated phpMyAdmin.conf file with Apache Webserver.
Once this is done, we are ready to start using phpMyAdmin.
use the following command to restart the apache web server.
systemctl restart httpd
After installation of phpMyAdmin
so we have successfully installed the phpmyadmin in our CentOS.
to check the GUI (Graphics user interface) of phpmyadmin.
go to the browser and type http://127.0.0.1/phpmyadmin . so the default IP is 127.0.0.1 so you must replace it with your machine IP.
Setup Login Credentials
You can set your credentials (Username and Password) in a below-mentioned manner.
First, we need to get into the phpMyAdmin installation directory by using below command.
/etc/phpMyAdmin
Here you can find the below mentioned file.
config.inc.php
Now we are going to create your credentials in this file. By using below command we can edit the config.inc.php file.
vim config.inc.php
Edit the file with your own credentials. As we did before, for Saving the changes made in the config file, enter :wq. And then exit from the config.inc.php file by pressing ESC key.