Bobcares

How to manage databases using phpMyAdmin?

by | Sep 17, 2020

phpMyAdmin provides an easy to use and easy to understand interface to administer and manage databases.

As a part of our Server Management Services, we help our Customers with several database-related tasks regularly.

Let us today discuss the possible steps for managing databases via phpMyAdmin

How to access phpMyAdmin in Plesk and cPanel?

phpMyAdmin is a software tool that supports a wide range of operations with MySQL. Let us now discuss the steps to access phpMyAdmin in plesk and cPanel.

 

Access phpMyAdmin in PLESK

  1. Log into the Plesk Control Panel.
  2. Once you are logged in, click on Databases.
  3. Under Subscription, click on the domain associated with the DB that we would like to work with.
  4. Scroll down to the database we intend to work with and click on the phpMyAdmin icon below it. This will launch the phpMyAdmin utility in your browser.

Access phpMyAdmin in cPanel

  1. Log into the cPanel account for the desired domain.
  2. Locate the Databases and click phpMyAdmin.

When it opens the phpMyAdmin home page, click on Databases and then select a database to manage by clicking its name.

In the page that opens, we will see a list with the database tables, the allowed actions with them, the number of the records, the storage engine, the collation, the tables’ sizes, and the overhead.
 

Important tabs in phpMyAdmin

Let us now discuss some of the important tabs in phpMyAdmin.

manage databases phpMyAdmin

Databases

The Databases tab lists all the databases which can be managed through the cPanel user. If we enable the statistics for the databases, we will see a table with the used collations, the number of the tables and rows, the size of the data and indexes, the total size, and the overhead.

SQL

In this tab, we can run SQL queries either by entering the entire SQL query code or manually defining the parameters of the query. Keep in mind that this tab is context-sensitive, which means that depending on what we are looking at, the target of your SQL queries might be different.

Export

The Export tab allows us to export the database tables content in different formats – CSV, SQL, PDF, Microsoft Excel, Microsoft Word, XML, etc. We can select either all the database tables or choose specific ones. This tab is also context-sensitive – we can either export all databases or a single database/table.

Import

The Import tab allows us to import our database tables from a file saved on the local machine. We can only import the databases that are under 1 GB. If the database backup is bigger than this, we will need need to import it via SSH.
 

Basic Actions to manage databases using phpMyAdmin

The possible actions that we can perform on a table via phpMyAdmin include:

Browse

Only the tables with existing records can be browsed. Once we click on Browse a new page with a list of the records inside the table will be opened.

By clicking on Edit we can edit the chosen record. We will see the record structure and we can alter the values of the records. Once we are done with the changes, submit them by clicking on Go at the bottom of the page.

Structure 

By clicking the Structure button, a new page will open that shows the database table’s structure. We will see the fields’ names, their types, collations, attributes, additional extra information, the default values, and whether the fields’ values can be NULL.

We can browse for distinct values by clicking on the corresponding action icon. Also, we can edit a field’s structure or delete a field. We can define different indexes: Primary, Unique, Index, and Fulltext.

Search

With the Search button, we can generate a search query for the chosen table. We can use the Query by example functionality to perform a search. Just use different fields to structure the search query and click on Go to execute it.

For example,  to visualize all the records with a field value that starts with “a” we should first select the fields which we want to show. Pick the LIKE operator from the drop-down menu and enter in the corresponding field value “a%” (% stands for a wildcard string). Click on the Go button to see the result.

Insert 

Using the Insert button, we can insert records in the database table. Once we fill in the corresponding values click on Go and the new record will be inserted.

Empty

The Empty button allows us to empty a database table, removing the data and keeping the empty table.

Drop 

With the Drop button, we can delete the whole table and all the records stored in it.
 

Repair a crashed database table:

We could easily repair a database table from the phpMyAdmin with the steps below:

  1. Select any tables that are marked as “in use” in phpMyAdmin.
  2. In the “With selected” dropdown menu, select the “Repair table” option.
  3. MySQL will now attempt to repair the crashed table. The repair operation may take a while to complete, depending on the size of the table.

View MySQL Processes from phpMyAdmin

We may view the current MySQL processes running by selecting the “Processes” tab while at the home page of phpMyAdmin. To kill a process simply click the ‘kill’ link to the left of the process id number.

[Need any further assistance with database administration tasks? – We’re available 24*7]

 

Conclusion

In short, phpMyAdmin provides an easy to use and easy to understand interface to administer databases. Today, we saw how our Support Engineers manage databases with phpMyAdmin.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

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

Never again lose customers to poor
server speed! Let us help you.