Optimizing and repairing MySQL databases using phpMyAdmin

Learn how to optimize and repair MySQL databases using phpMyAdmin with these easy-to-follow instructions. Learn both the basic and more advanced features of phpMyAdmin.

This article describes how to optimize and repair MySQL databases using phpMyAdmin.

Optimizing MySQL databases

Databases have the potential to grow very large, particularly on sites that receive a lot of traffic or have a large amount of content. In such cases, periodic database optimization may help improve web site performance.

To optimize a MySQL database, follow these steps:

  1. Log in to cPanel.

    📘

    Note

    If you do not know how to log in to your cPanel account, please see this article.

  2. Open phpMyAdmin:

  • If you are using the Jupiter theme, on the Tools page, in the Databases section, click phpMyAdmin:
    cPanel - Databases - phpMyAdmin icon

  • If you are using the Paper Lantern theme, in the DATABASES section of the cPanel home page, click phpMyAdmin:
    phyMyAdmin

  1. The phpMyAdmin administration page appears in a new window. In the left pane, click the name of the database that you want to optimize. For example, the following image shows the example_wordpress database selected:

  2. In the right pane, select the check boxes for the tables in the database that you want to optimize.

👍

Tip

To select all of the tables at once, select the Check All check box:
phpMyAdmin - main pane

  1. In the With selected list box, select Optimize table. phpMyAdmin informs you whether or not the optimization process is successful.

Repairing MySQL databases

Databases can become corrupted for any number of reasons, from software defects to hardware issues. If this occurs, you can try to repair database tables using phpMyAdmin.

To repair MySQL database tables, follow these steps:

  1. Log in to cPanel.

    📘

    Note

    If you do not know how to log in to your cPanel account, please see this article.

  2. Open phpMyAdmin:

  • If you are using the Jupiter theme, on the Tools page, in the Databases section, click phpMyAdmin:
    cPanel - Databases - phpMyAdmin icon

  • If you are using the Paper Lantern theme, in the DATABASES section of the cPanel home page, click phpMyAdmin:
    phyMyAdmin

  1. The phpMyAdmin administration page appears in a new window. In the left pane, click the name of the database that you want to work on. For example, the following image shows the example_wordpress database selected:

  2. In the right pane, select the check boxes for the tables in the database that you want to repair.

👍

Tip

To select all of the tables at once, select the Check All check box:
phpMyAdmin - main pane

  1. In the With selected list box, select Repair table. phpMyAdmin informs you whether or not the repair process is successful.

More Information

What is phpMyAdmin?

phpMyAdmin is a PHP-based, easy to use solution for the administration of MySQL and MariaDB databases. It is an extremely mature software option getting its start back in September 1998.

phpMyAdmin database management features

phpMyAdmin is loaded with a number of features that have helped it grow into one of the most popular database administration tools available today. Just some of these tools includes:

  • User-friendly interface makes it particularly easy to manage your databases

  • Allows for both the management of your MySQL and MariaDB databases

  • The option to import your data from both SQL and CSV formats

  • Option to export your data from numerous formats including CSV, SQL, PDF, XML, Word, Excel and many more

  • The ability to administer multiple servers at once

  • Build PDF graphics of the layout of your database

  • The options to either search a subset of your database or perform a global search

  • Change the data you have stored into any format of your choosing through the use of predefined functions

  • View real time activity charts for the monitoring of your MySQL server including CPU/RAM use, server processes and connections

  • phpMyAdmin is compatible with a number of different operating systems

phpMyAdmin database management options

With all the powerful features included within phpMyAdmin, it's easy to forget that its designed to make it easier to manage your MariaDB and MySQL databases. Here are the ways phpMyAdmin makes it possible to do just that:

  • Browse Tables – You can view all tables that have existing records with a click of the browse button. From there you'll see a comprehensive list of the table's records.

  • Table Structure – Click the button to view a list of the table's field names, attributes, types, collations and just about anything else you could want to know.

  • Add Information – Click the Insert button within your phpMyAdmin install to insert records within your database.

  • Search Function – Easily find any information you're looking for within a specific table.

  • Drop – Use this functionality to remove an entire table as well as any records that it contains.

  • Remove Data – Similar to the drop button, the Empty button gives you the ability to remove data while still keep the newly empty table.

Related Articles