MyBB Community Forums

Full Version: 1034 - Index for table 'mybbbh_adminlog' is corrupt
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello friends I have a problem...
Any change I want to save to the ACP throws the following error message. For example when I try to optimize that table (mybbbh_adminlog) through the ACP.


MyBB has experienced an internal SQL error and cannot continue.
SQL Error:
1034 - Index for table 'mybbbh_adminlog' is corrupt; try to repair it
Query:
INSERT INTO mybbbh_adminlog (`uid`,`ipaddress`,`dateline`,`module`,`action`,`data`) VALUES (1,X'00000000000000000000000000000001',1654000100,'tools-optimizedb','','a:1:{i:0;s:33:\"a:1:{i:0;s:15:\"mybbbh_adminlog\";}\";}')


VersiĆ³n PHP 7.4.29r
SQL MySQLi 10.4.24


I tried to fix it with
CHECK TABLE mybbbh_adminlog
REPAIR TABLE mybbbh_adminlog

But these commands do not correct the problem, any other way to repair the table or its index?,
UPDATE.....
I tried this
ALTER TABLE `mydatabase`.`mybbbh_adminlog` DROP INDEX `module`, ADD INDEX `module` (`module`, `action`) USING BTREE;
ALTER TABLE `mydatabase`.`mybbbh_adminlog` DROP INDEX `uid`, ADD INDEX `uid` (`uid`) USING BTREE;
But these commands do not correct the problem

Or can I drop the table and create it again along with the index ?
Happily all of this happened on the test server using XAMPP.
So after several tests I had to take a drastic measure, like restoring mysql from backup and copying the databases I needed from the data folder (which I had renamed to dataold), plus the ibdata1 file. A few adjustments and everything was back to normal.
PS: I recommend that before stopping apache and myadmin, close the ACP and forum sessions, before finishing any tests on localhost.


Big Grin Cool