Reaching out to others! Free & Open Source Software, Kannada, L10n, L18n Data Science, Cloud Computing & more…

We were (myself and hpn) hit by a strange error (atleast for us ;) ) while we started putting up sampada media wiki onboard from backup. Wiki didn’t load for which we were using MySQL InnoDB tables. Dumping some other old database backup also didn’t help.

Here is what we were greeted with on the browser:

MediaWiki internal error.
Original exception: exception ‘DBQueryError’ with message ‘A database error has occurred Query: SELECT value,exptime FROM `wiki_objectcache` WHERE keyname=’techfizn_wiki1-wiki_:messages-hash’ Function: MediaWikiBagOStuff::_doquery Error: 1146 Table ‘techfizn_wiki1.wiki_objectcache’ doesn’t exist (localhost) ‘ in /home/techfizn/public_html/projects/wiki/includes/Database.php:824 Stack trace:
0 /home/techfizn/public_html/projects/wiki/includes/Database.php(779): Database->reportQueryError(‘Table ‘techfizn…’, 1146, ‘SELECT value,ex…’, ‘MediaWikiBagOSt…’, false)
1 /home/techfizn/public_html/projects/wiki/includes/BagOStuff.php(405): Database->query(‘SELECT value,ex…’, ‘MediaWikiBagOSt…’)
2 /home/techfizn/public_html/projects/wiki/includes/BagOStuff.php(300): MediaWikiBagOStuff->_doquery(‘SELECT value,ex…’)
3 /home/techfizn/public_html/projects/wiki/includes/BagOStuff.php(234): SqlBagOStuff->_query(‘SELECT value,ex…’, ‘techfizn_wiki1-…’)
4 /home/techfizn/public_html/projects/wiki/includes/MessageCache.php(205): SqlBagOStuff->get(‘techfizn_wiki1-…’)
5 /home/techfizn/public_html/projects/wiki/includes/MessageCache.php(441): MessageCache->load()
6 /home/techfizn/public_html/projects/wiki/includes/GlobalFunctions.php(467): MessageCache->get(‘mainpage’, true, true)
7 /home/techfizn/public_html/projects/wiki/includes/GlobalFunctions.php(421): wfMsgGetKey(‘mainpage’, true, true, true)
8 /home/techfizn/public_html/projects/wiki/includes/GlobalFunctions.php(368): wfMsgReal(‘mainpage’, Array, true, true)
9 /home/techfizn/public_html/projects/wiki/includes/Title.php(268): wfMsgForContent(‘mainpage’)
10 /home/techfizn/public_html/projects/wiki/includes/Wiki.php(92): Title::newMainPage()
11 /home/techfizn/public_html/projects/wiki/index.php(58): MediaWiki->checkInitialQueries(NULL, ‘view’, Object(StubObject), Object(WebRequest), Object(StubContLang))
12 {main}
Exception caught inside exception handler: exception ‘DBUnexpectedError’ with message ‘Error in fetchObject(): Table ‘techfizn_wiki1.wiki_page’ doesn’t exist (localhost)’ in /home/techfizn/public_html/projects/wiki/includes/Database.php:953 Stack trace:
0 /home/techfizn/public_html/projects/wiki/includes/MessageCache.php(314): Database->fetchObject(false)
1 /home/techfizn/public_html/projects/wiki/includes/MessageCache.php(251): MessageCache->loadFromDB()
2 /home/techfizn/public_html/projects/wiki/includes/MessageCache.php(441): MessageCache->load()
3 /home/techfizn/public_html/projects/wiki/includes/GlobalFunctions.php(467): MessageCache->get(‘databaseerror’, true, false)
4 /home/techfizn/public_html/projects/wiki/includes/GlobalFunctions.php(421): wfMsgGetKey(‘databaseerror’, true, false, true)
5 /home/techfizn/public_html/projects/wiki/includes/Exception.php(23): wfMsgReal(‘databaseerror’, Array)
6 /home/techfizn/public_html/projects/wiki/includes/Database.php(276): MWException->msg(‘databaseerror’, ‘Database error’)
7 /home/techfizn/public_html/projects/wiki/includes/Exception.php(125): DBQueryError->getPageTitle()
8 /home/techfizn/public_html/projects/wiki/includes/Exception.php(88): MWException->htmlHeader()
9 /home/techfizn/public_html/projects/wiki/includes/Exception.php(111): MWException->reportHTML()
10 /home/techfizn/public_html/projects/wiki/includes/Exception.php(191): MWException->report()
11 /home/techfizn/public_html/projects/wiki/includes/Exception.php(225): wfReportException(Object(DBQueryError))
12 [internal function]: wfExceptionHandler(Object(DBQueryError))
13 {main}

Fix: InnoDB engine works with 3 files in mysql data folder. ib_logfile0 and ib_logfile1 for logs and for data storage it uses ibdata1.

-rw-rw—- 1 mysql mysql 5242880 Oct 27 21:52 ib_logfile0
-rw-rw—- 1 mysql mysql 5242880 Oct 27 21:52 ib_logfile1
-rw-rw—- 1 mysql mysql 44040192 Oct 27 21:52 ibdata1

To resolve the above issue we removed the log files and restarted the MySQL to get going quickly with our mediawiki installation. Hope this saves few hours for others facing the same problem.

Source: