Bobcares

MySQL repair crashed table – Here’s the quickest fix

by | Apr 16, 2019

Database drives a major share of websites on the Internet. At times, you may have serious website problems due to database errors.

A typical example of such error shows up as “MySQL table has marked as crashed and should be repaired”. The reasons for such errors could be the storage issue, hardware corruption, etc.

Repairing MySQL crashed tables can be tricky and any minute error may damage the entire database. That’s why we often get requests from customers to repair MySQL tables as part of our Technical Support Services.

Today, let’s understand how to “Repair MySQL tables” and the way Bobcares’ Engineers fix it.

 

What causes MySQL tables to crash?

A database is a systematic arrangement of data. Databases make data management easier and more effective. It allows users to control read/write access, generate reports, and analyze usage through a database manager.

Furthermore, there are many reasons for the crash of the MySQL table. From the experience of our Support Engineers in server management, below are the top 2 reasons for a MySQL table crash.

1. The major cause of the database corruption is the lack of free disk space on the server.

2. Other possible causes of MySQL table crashes include operating system problems, power failures, hardware issues, unexpected MySQL server termination, data corruption due to external programs, etc.

A database crash easily makes your website down. That’s where we need to quickly repair MySQL tables and make database working again.

 

How to fix Mysql crashed table?

Often, when your website stops working, it starts showing error like “MySQL table has marked as crashed and should be repaired”.  The fix for the problem is already present in the error. But, the repair process may additionally create some other errors too.

That’s where our expertise in Database management helps. Let’s now see how Bobcares’ Engineers help you to fix the database error.

 

1. Repairing the table using PHPMyAdmin

A little while back, one of our customers approached us with a request to repair his website database. When our Support Engineers checked, we found that the size of the database was small and the server had MyISAM engine. Repairing database tables of few MB sizes easily works with PHPMyAdmin.

That’s why we began repairing of MySQL table using PHPMyAdmin using the following steps.

1. Initially, we Logged on to PHPMyAdmin

2. Then, we selected the affected database from the listed databases and selected the affected table from the right pane

3. In the With selected list box, selected Repair table.

And the crashed table was successfully repaired.

 

2. Repairing the crashed table using the MySQL console

Similarly, another customer of ours contacted us with an issue as “MySQL table has marked as crashed and should be repaired”. Our Support Engineers found that the size of the database was pretty large. Due to this, it was not possible to repair it with PhpMyadmin. Therefore, we tried to repair through mysql command-line utility using “repair table my_crashed_table;“.

mysql> use my_database;
mysql> repair table my_crashed_table;

Finally, we check the status of the table once again using the mysql check command:

mysql> check table xxx_xxx_update;
+--------------------------------+-------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+--------------------------------+-------+----------+----------+
| xxx.xxx_update | check | status | OK |
+--------------------------------+-------+----------+----------+

Precautions we take to avoid MySQL table crash

Database repairs can often create additional problems. That’s why our Support Engineers always take proactive measures to prevent data loss. These steps include:

1. Always take a backup of the customer database.

2. We will analyze the exact requirement of the customer with the website and suggest the best architecture for them. That means, if the customer wishes to increase the size of the database, it doesn’t affect disk space.

3. Check the free space on the server and the size of the database prior to the actual repair. For example, we refrain from repairing a large database on a shared hosting server with disk space shortage.

[Database tables crashed? We can repair the database for you.]

 

Conclusion

In short, most of the websites run using databases. One of the best ways to solve website problems like database corruption is to repair crashed MySQL tables. However, it can be often tricky. Today, we saw how our Support Engineers fixed the error “MySQL table has marked as crashed and should be repaired”.

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.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF