Tag Archives: phpMyAdmin

Rename a Database in phpMyAdmin

In this article, we will show you how to rename a database using phpMyAdmin.

A free and open-source program for managing MySQL databases is called phpMyAdmin. It is one of the most widely used web-based MySQL management tools for hosting companies. Users can communicate with their MySQL databases using phpMyAdmin, which is written in PHP.

Quick Steps

Step 1: Go to cPanel > Databases > phpMyAdmin
Step 2: Select the database you wish to rename from the left-hand column.
Step 3:
Click on the Operations tab.
Step 4:
Under the field “Rename database to:” enter the new database name.
Step 5:
Click the Go button.
Step 6:
Click OK to proceed.
Step 7:
Once the operation is complete, click OK when asked if you want to reload the database.

Note: Keep in mind that when you change the name of a database, you will have to reconfigure user permissions to continue referencing this database.

Renaming the Database

Go to cPanel > Databases and click on phpMyAdmin.

Renaming the Database

Renaming the Database

phpMyAdmin will open up in a new tab. Select the database you wish to rename from the left-hand column and then click on Operations.

phpMyAdmin Operations

phpMyAdmin Operations

Select a database in phpMyAdmin.

Enter the new database name in the field “Rename database to:” and click Go. 

Renaming the database

Renaming the database

Renaming the database.

Click OK to proceed when it asks if you want to create the new database and drop the old database.

create the new database and drop the old database

Rename the database in phpMyAdmin.

That’s it! The database has been renamed to “test” as shown below, 

PHPMyAdmin Structure

PHPMyAdmin Structure

Databases list in phpMyAdmin.

Re-configuring User Permissions.

The user permissions will need to be updated because the database has been given a new name. Click on MySQL Databases on the main cPanel screen.

The Add User To Database part can be found by scrolling down the page. Choose the renamed database and the database user who was formerly linked to this database from the list. Next, select the Add button.

Add User to Database

Add User to Database

Reconfigure permissions for the database user in cPanel.

On the Manage User Privileges page, check the box next to All Privileges and click on the Make Changes button.

Manage User Privileges

Manage User Privileges

Conclusion

The database should now have a new name. You may also need to update all the scripts or applications to continue accessing the renamed database.

How To Install phpMyAdmin on CentOS 7

In this tutorial, we will go through the steps to installing and configuring phpMyAdmin in CentOS 7.

All commands – without sudo

yum update -y 
yum install epel-release -y 
yum install phpmyadmin -y 

All commands – with sudo

sudo yum update -y 
sudo yum install epel-release -y
sudo yum install phpmyadmin -y

Introduction

phpMyAdmin is an open source tool for managing and interacting with MySQL databases. phpMyAdmin uses a web-based management interface which allows users to interact with databases through web browser. It allows us to manage database users and privileges, import and export databases, execute database queries and more.

Prerequisites

Step 1. Update your system

Start by updating the system. You can use the below command.

yum update -y 

Step2. Add Repo

Since phpMyAdmin is not available in CentOS 7’s default repository, we need to add the Extra Packages for Enterprise Linux (EPEL) repo by executing the below command.

yum install epel-release -y 

Step 3. Install phpMyAdmin

After adding the repo, you can install phpMyAdmin using the yum package by typing the below command:

yum install phpmyadmin -y 

For phpMyAdmin to work properly, we need to make some changes to the configuration file. Open the configuration file using your text editor.

vi /etc/httpd/conf.d/phpMyAdmin.conf

By default the configuration is set up to access the connection only from localhost. In order to work remotely, you will need to specify the addresses in the configuration file.

Add your remote IP to the respective lines on the configuration as shown below.

Require ip your_ip_address
Allow from your_ip_address

Restart Apache to apply the modifications.

systemctl restart httpd

Now you can access phpMyAdmin using the URL below.

http://server_domian_or_ip/phpmyadmin
How To Install phpMyAdmin in CentOS 7

How To Install phpMyAdmin in CentOS 7

To login, use a valid username and password of a MariaDB user. You can the root user and MariaDB administrative pass to login by default. You can then access the administrative interface:

How To Install phpMyAdmin in CentOS 7

How To Install phpMyAdmin in CentOS 7

Conclusion

You’ve successfully installed phpMyAdmin on your CentOS 7 machine. Now you can manage your databases through a web interface. You can manage databases, users, and tables, perform various other MySQL queries and operations.