For Windows-based Manager:
Use the following steps to verify tables from the command prompt:
- Stop the Manager Service. Click the Network Security icon in the notification area and then select Stop Manager.
- Login to the MariaDB database by following the steps listed in KB96975 - How to login to the MariaDB Database in Trellix IPS Manager.
-
From the prompt, type the following command and press Enter:
check table <table name>;
For example:
check table iv_packetlog;
+-----------------+-------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+-----------------+-------+----------+----------+
| lf.iv_packetlog | check | status | OK |
+-----------------+-------+----------+----------+
-
If the table is corrupt, type the following command and press Enter:
repair table <table name>;
NOTE: If the QUICK option is specified, REPAIR TABLE tries to repair only the index tree. To run REPAIR TABLE without the QUICK option, the space on the hard drive needs to be equal to or more than the size of the table that you want to REPAIR.
Example 1
repair table iv_packetlog
+-----------------+--------+----------+------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+-----------------+--------+----------+------------------------------------------------+
| lf.iv_packetlog | repair | error | Can't find file: 'iv_packetlog.MYI' (errno: 2) |
+-----------------+--------+----------+------------------------------------------------+
1 row in set (0.00 sec)
Example 2
repair table iv_packetlog QUICK;
+-----------------+--------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+-----------------+--------+----------+----------+
| lf.iv_packetlog | repair | status | OK |
+-----------------+--------+----------+----------+
1 row in set (0.05 sec)
-
If the MYI file is missing, type the following command and press Enter:
repair table <table name> USE_FRM;
For example:
repair table iv_packetlog USE_FRM;
+-----------------+--------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+-----------------+--------+----------+----------+
| lf.iv_packetlog | repair | status | OK |
+-----------------+--------+----------+----------+
1 row in set (0.05 sec)
-
Run the check table command again to verify that it has fixed the index.
At the prompt, type the following command and press Enter:
check table <table name>;
For MLOS-based Manager:
Use the following steps to verify tables from the command prompt:
- Stop the Manager Service:
Type stop manager and press Enter.
- Open the Database shell:
- Type dbShell and press Enter.
- Enter the database credentials when prompted.
- From the prompt, type check table <table name> and press Enter:
For example:
check table iv_packetlog
+-----------------+-------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+-----------------+-------+----------+----------+
| lf.iv_packetlog | check | status | OK |
+-----------------+-------+----------+----------+
1 row in set (0.11 sec)
- If the table is corrupt, type the repair table <table name> command and press Enter.
NOTE: If the QUICK option is specified, REPAIR TABLE tries to repair only the index tree.
To run REPAIR TABLE without the QUICK option, the space on the hard drive must be equal to or more than the size of the table that you want to REPAIR.
Example 1:
repair table iv_packetlog
+-----------------+--------+----------+------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+-----------------+--------+----------+------------------------------------------------+
| lf.iv_packetlog | repair | error | Can't find file: 'iv_packetlog.MYI' (errno: 2) |
+-----------------+--------+----------+------------------------------------------------+
1 row in set (0.00 sec)
Example 2:
repair table iv_packetlog QUICK
+-----------------+--------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+-----------------+--------+----------+----------+
| lf.iv_packetlog | repair | status | OK |
+-----------------+--------+----------+----------+
1 row in set (0.05 sec)
- If the MYI file is missing, type repair table <table name> USE_FRM and press Enter:
For example:
repair table iv_packetlog USE_FRM
+-----------------+--------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+-----------------+--------+----------+----------+
| lf.iv_packetlog | repair | status | OK |
+-----------------+--------+----------+----------+
1 row in set (0.05 sec)
- Run the check table command again to verify that it has fixed the index.
At the prompt, type check table <table name> and press Enter.