cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post

Ouch, MySQL Table Crashed!

Level 9

You're using Storage Manager, for your storage monitoring and you get an error message in your Web console or log files:

     java.sql.SQLException: Table '<table name>' is marked as crashed and last automatic(?) repair failed

What does it mean, and how do you fix it?

Two possibilities for finding and fixing MySQL table crashes

MyISAM storage engine

The MySQL database uses MyISAM as a default storage engine, and the MyISAM table is easily corrupted.

But take heart, you can use the MyISAMCHK command to resolve crashed tables. The article, How to Run a myisamchk to Resolve Crashed mysql Tables, provides detailed instructions on using the MyISAMCHK commands for Windows and Linux to resolve crashed MySQL tables in your Storage Manager powered by Profiler product.


More MyISAMCHK options

The MySAMCHK provides other useful commands such as:

  • Identify all corrupted tables
  • Repair corrupted tables
  • Perform check and repair together for the entire MySQL database
  • Allocate additional memory for a large MySQL database
  • Get information about tables

For more information on these and other MYSAMCHK options, see How to Repair Corrupted MySQL Tables Using MyISAMCHK

Anti-virus, intrusion detection, or back up software is blocking MySQL

A common cause for crashed tables in MySql is antivirus, intrusion detection, or backup software. This can happen when these programs lock files in the MySQL database while Storage Manager is trying to use the files.

To prevent conflicts, add exceptions to these tools so they do not access the <STM Server Install Directory>\mysql folder and sub folders. Storage performance monitoring simplified!

Share your MySQL table crashes

I'd like to hear about your experience with MySQL table crashes, and how you fixed them with your storage performance monitoring software.

pastedImage_0.png

2 Comments
Level 8

Important thing to remember is to STOP  the mariadb service first and then to run this syntax afterwards:

windows:

c:\program files\solarwinds\storage manager server\mariadb\data\storage\

for %i in (*.MYI) do ..\..\bin\myisamchk --defaults-extra-file=..\..\my.cnf --check --analyze -r -v %i

OR

linux:

/opt/Storage_Manager_Server/mariadb/bin/

./myisamchk --defaults-extra-file=../my.cnf --check --analyze -r -v ../data/storage/*.MYI

Let that run and, when finished, check the <install path>\mariadb\data\storage (if windows or) <install path>/mariadb/data/storage/ directory (if on linux) for ".TMD" files. If you find them, delete them and run the above command ) again.

If you do not find any, just start up the mariadb service, let it run for 2 minutes or so and then start up the rest of the Storage Manager services.

Level 15

This is helpful information.  Thanks for the post!