Repairing a MySQL Database With phpMyAdmin

How to fix a database table that is corrupted using phpMyAdmin

Using MySQL with PHP expands and enhances the features you can offer on your website. One of the most popular methods of managing a MySQL database is through phpMyAdmin, which is already on most web servers.

Occasionally, database tables become corrupt and you are no longer able to access them or they don't respond as quickly as you'd like. In phpMyAdmin, the process of checking the table and repairing it so you can access the data again is fairly simple.

Before you begin, make a backup of the database in case phpMyAdmin can't repair it.

Checking Your Database in phpMyAdmin

  1. Log in to your web host.
  2. Click the phpMyAdmin icon. If your host uses cPanel, look there.
  3. Choose the affected database. If you only have one database, it should be chosen by default so you don't need to do anything.
  4. In the main panel, you should see a list of your database tables. Click Check All to select all of them.
  5. At the bottom of the window just below the list of tables, there is a drop-down menu. Choose Check Table from the menu.

When the page refreshes, you will see a summary of any table that may be corrupted. If you receive any errors, repair the table.

phpMyAdmin Repair Steps

  1. Log in to your web host.
  2. Click the phpMyAdmin icon. 
  3. Choose the affected database. 
  4. In the main panel, you should see a list of your database tables. Click Check All to select all of them.
  5. Choose Repair Table from the drop-down menu at the bottom of the screen.

    When the page refreshes, you should see a summary of any tables that were repaired. This should fix your database and let you access it again. Now that it is fixed, it's a good idea to make that database backup.

    Format
    mla apa chicago
    Your Citation
    Bradley, Angela. "Repairing a MySQL Database With phpMyAdmin." ThoughtCo, Nov. 22, 2016, thoughtco.com/repairing-mysql-database-with-phpmyadmin-2693966. Bradley, Angela. (2016, November 22). Repairing a MySQL Database With phpMyAdmin. Retrieved from https://www.thoughtco.com/repairing-mysql-database-with-phpmyadmin-2693966 Bradley, Angela. "Repairing a MySQL Database With phpMyAdmin." ThoughtCo. https://www.thoughtco.com/repairing-mysql-database-with-phpmyadmin-2693966 (accessed February 23, 2018).