How to repair mysql database table manually?

You can repair the database table manually from shell by using following command.

root@admin[~]mysql>mysql –u databaseusername –p databasename

For example if we are using database gunjan_db

root@admin[~]mysql

mysql> use gunjan_db;
Database changed

mysql> show tables;

+———————————————+
| Tables_in_gunjan_db              |
+———————————————+
| additional_images
| address_book
| address_format
| administrators
| banners
| banners_history
| cache
| categories
| categories_description
| configuration
| configuration_group

| counter

| orders_products
| orders_products_attributes
| orders_products_download
| c
| orders_status_history
| orders_total

For example we need to repair table orders_status

mysql> repair table orders_status;
+————————————+——–+———-+———-+
| Table                              | Op     | Msg_type | Msg_text |
+————————————+——–+———-+———-+
| gunjan_db.orders_status | repair | status   | OK       |
+————————————+——–+———-+———-+
1 row in set (0.11 sec)

mysql> q
Bye

 

Both comments and pings are currently closed.

Comments are closed.