How do I repair a database via phpMyAdmin in cPanel?

Introduction

Two of the most useful Functions of phpMyAdmin are certainly the possibilities to improve your Repair database table and to optimize. During the normal operation of your website, it may happen that a table crashes and becomes inaccessible to your visitors. The repair option is a great tool that comes in handy in such cases. With a quick repair, you can restore the database table to its normal state and get your website, such as a WordPress site, up and running again.

The optimization option is also important because the overhead of your database will inevitably increase if you are constantly running queries. This overhead consists of "leftovers" Queries, rows, columns, indexes, etc. that your database has used in the past. If these are not optimized over a long period of time, they accumulate and slow down your website. You can think of optimization as a Regular maintenance to which you bring your car once a year.

In this tutorial we will show you how to use the repair and optimization functions of phpMyAdmin can use.

Access phpMyAdmin

Before you can access the PHPMyAdmin functionality, you need to log into your cPanel account with us. Please read our instructions for the Access to the cPanel service

Once you are logged in, please navigate to the section "Database" and click on the icon "phpMyAdmin".

Access phpMyAdmin
Log in to phpMyAdmin via cPanel

If you click on the result, you will be redirected to the "PHPMyAdmin" function. You will see a list of all your databases in the left-hand sidebar.

PHPMyAdmin

Select the database to be optimized or repaired from the list.

How to optimize the database table

After selecting the database, all tables will be displayed in the middle of the screen. If you scroll down, you will see the dropdown menu "marked:".

Database table optimized

When expanded, this drop-down menu contains various operations you can perform on your tables. The operation you should look for is "optimize table".

To start the "Optimize table" operation, please select one of the database tables using the checkboxes on the left-hand side of the middle table area. You can also select several databases by activating the corresponding checkboxes.

 Activate checkbox

After the table is selected, please click on the option "Optimize table" in the drop-down list. The process is initiated immediately and after a short loading screen the table is optimized.

Optimize table

This is confirmed by the message "Your SQL query was executed successfully" at the top of the page.

When you optimize a table with InnoDB, you may receive a warning that the optimization has failed. Don't be alarmed, because despite the warning "Table does not support optimize..." phpMyAdmin performs a similar action that leads to a similar result. It recreates the table, exports the SQL code and imports it again. If MyISAM is selected, phpMyAdmin will perform a standard optimize action and you will receive an "OK" message in the "Msg_text" column.

Another similar post: How to reduce the size of the database?

How to repair your database table

After selecting the database, all tables are displayed in the middle of the screen. You must scroll to the bottom of the page, where you will find the drop-down menu "Selected:".

database table repair and optimize

Among the options, look for the option "Repair table".

To start the "Repair table" process, please select one of the database tables using the checkboxes on the left-hand side of the middle table area. You can also select several databases by activating the corresponding checkboxes.

database table repair and optimize

After you have selected the tables, please click on the option "Repair table". The process is started immediately and after a short loading screen the table is repaired.

database table repair and optimize

This is confirmed by the message "Your SQL query was executed successfully" at the top of the page.

Similar to the "Optimize table" function, the "Repair table" option displays a warning if it is used for a table with the InnoDB storage engine.

That's it! The phpMyAdmin method for performing optimization and repair operations for your databases via the cPanel. If you have any problems with these operations, please contact our support team. We are available 24/7 via the Ticketing system available in your customer area.

Video tutorial

We have created a video tutorial for you here as well.

Read also: How to export a database with phpMyAdmin?

Hat Ihnen diese Anleitung geholfen?

Fast Wordpress hosting

Your WordPress deserves a home that is as unique as your content. Discover hosting that is tailored to the needs of WordPress!