This article provides information on myisamchk and MariaDB tables.
What does a myisamchck do?
It will check, compress and repair MariaDB tables.
Note: Storage Manager versions 5.6 and later use MariaDB. For earlier versions, MYSQL is used.
For versions prior to v5.6, substitute MySQL for MariaDB.
When to run a myisamchk?
If the following error appears in the web console or logs:
java.sql.SQLException: Table " is marked as crashed and last (automatic?) repair failed.
A myisamchk can be run to fix the crashed tables.
Note: You can find your MariaDB log at the Storage Manager Server \mariadb\data\ location. The file is named machine name.err.
STM versions 5.6 or later
A common cause of crashed tables in MariaDB can be an antivirus/intrusion detection or a backup software. If the tables are locked at the same time when Storage Manager is trying to write to them, this can cause corruption of the tables.
To prevent this from happening, you need to add exceptions to these tools so they do not access the \mariadb folder and subfolders.
For more information, you may refer to https://mariadb.com/kb/en/mariadb/myisamchk/.
Run myisamchk to fix crashed tables on Windows
Check tables for errors
Recover, this option can fix most issues except unique keys that are not unique
Analyze distribution of keys
Force override of old temporary files
Verbose, this option prints information to the screen
Run myisamchk to fix crashed tables on Linux
Repair individual tables
Sometimes, myisamchk fails to fix all the corrupted tables. When this happens, users can perform the following procedure to repair individual tables.
Note: It is strongly recommended to create a backup of the crashed table(s) before starting with the below steps. Under some circumstances, the following steps may cause data loss to the corrupted tables. Possible causes include but are not limited to file system errors.
For more information regarding table repairs, refer to the following link: