How to Repair a Corrupt Table
Jump to navigation
Jump to search
Status: | Published |
---|---|
Version: | 1.0 |
Authors: | Hornbill Support |
Applies to: | Supportworks ESP 8.x, MariaDB |
How to Repair a Corrupt Table
This document details how to resolve an issue with a corrupt index file (extension .MYI) in the MySQL database. The error is reported as follows in the SwServer log file:
Can't open file: 'TABLE-NAME.MYI'. (errno: 145)
In order to resolve this, please follow the instructions below:
- Run the Supportworks Server Configuration utility. (Start > Programs > Supportworks Server > Supportworks Server Configuration.)
- On the Server tab, stop all services as listed below.
- SwAdminService
- SwCalendarService
- SwFileService
- SwIndexServer
- SwLogService
- SwMailSchedule
- SwMailService
- SwMessengerService
- SwSchedulerService
- SwServerService
- From the MS Windows Control Panel, stop the MariaDB service and Apache services.
- Make a copy of the corrupt .MYI file, .frm and its associated .MYD file. (Found in C:\Program Files\Hornbill\Core Services\SwSqlServer\data\database.)
- Restart the MariaDB service.
- Run the Interactive SQL program. (Start > Programs > Hornbill Core Services > Interactive SQL.)
- Enter the following, replacing
database
andtable-name
with the appropriate values.use database;
repair table table-name;
- Be sure to include the semi colon at the end of each statement above otherwise the command will not execute.
- Take a copy of the results returned. The table should now have been repaired.
- From the MS Windows Control Panel, restart the Apache service.
- On the Server tab of the Server Configuration utility, restart all remaining services as listed below.
- SwServerService
- SwSchedulerService
- SwMessengerService
- SwMailService
- SwMailSchedule
- SwLogService
- SwIndexServer
- SwFileService
- SwCalendarService
- SwAdminService
Should you require any further information feel free to contact the Support team using the web form https://support-works.com/support/