Topic on Project:Support desk

DBQueryError from line 1054 of /var/www/html/wiki/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

8
Summary by Ciencia Al Poder

old thread please ask on a new one

177.53.48.25 (talkcontribs)

My Mediawiki after I ran apt-get update on Linux, it has the following error:

MediaWiki internal error.

Original exception: [4bf8ad7e845b953a36f3fdc7] /wiki/ DBQueryError from line 1054 of /var/www/html/wiki/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? 

Query: SELECT page_title FROM `page` WHERE page_is_redirect = '0' AND page_namespace = '8' AND (page_title NOT LIKE '%/%' ) AND (page_len > 10000) 

Function: MessageCache::loadFromDB(pt-br)-big

Error: 1146 Table 'my_wiki.page' doesn't exist (localhost)

Backtrace:

#0 /var/www/html/wiki/includes/libs/rdbms/database/Database.php(912): Database->reportQueryError(string, integer, string, string, boolean)

#1 /var/www/html/wiki/includes/libs/rdbms/database/Database.php(1254): Database->query(string, string)

#2 /var/www/html/wiki/includes/cache/MessageCache.php(480): Database->select(string, string, array, string)

#3 /var/www/html/wiki/includes/cache/MessageCache.php(403): MessageCache->loadFromDB(string, NULL)

#4 /var/www/html/wiki/includes/cache/MessageCache.php(325): MessageCache->loadFromDBWithLock(string, array, NULL)

#5 /var/www/html/wiki/includes/cache/MessageCache.php(927): MessageCache->load(string)

#6 /var/www/html/wiki/includes/cache/MessageCache.php(858): MessageCache->getMsgFromNamespace(string, string)

#7 /var/www/html/wiki/includes/cache/MessageCache.php(826): MessageCache->getMessageForLang(Language, string, boolean, array)

#8 /var/www/html/wiki/includes/cache/MessageCache.php(767): MessageCache->getMessageFromFallbackChain(Language, string, boolean)

#9 /var/www/html/wiki/includes/Message.php(1188): MessageCache->get(string, boolean, Language)

#10 /var/www/html/wiki/includes/Message.php(802): Message->fetchMessage()

#11 /var/www/html/wiki/includes/Message.php(902): Message->toString()

#12 /var/www/html/wiki/includes/Title.php(557): Message->text()

#13 /var/www/html/wiki/includes/MediaWiki.php(116): Title::newMainPage()

#14 /var/www/html/wiki/includes/MediaWiki.php(136): MediaWiki->parseTitle()

#15 /var/www/html/wiki/includes/MediaWiki.php(766): MediaWiki->getTitle()

#16 /var/www/html/wiki/includes/MediaWiki.php(512): MediaWiki->main()

#17 /var/www/html/wiki/index.php(43): MediaWiki->run()

#18 {main}

Exception caught inside exception handler: [4bf8ad7e845b953a36f3fdc7] /wiki/ DBQueryError from line 1054 of /var/www/html/wiki/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? 

Query: SELECT page_title FROM `page` WHERE page_is_redirect = '0' AND page_namespace = '8' AND (page_title NOT LIKE '%/%' ) AND (page_len > 10000) 

Function: MessageCache::loadFromDB(pt-br)-big

Error: 1146 Table 'my_wiki.page' doesn't exist (localhost)

Backtrace:

#0 /var/www/html/wiki/includes/libs/rdbms/database/Database.php(912): Database->reportQueryError(string, integer, string, string, boolean)

#1 /var/www/html/wiki/includes/libs/rdbms/database/Database.php(1254): Database->query(string, string)

#2 /var/www/html/wiki/includes/cache/MessageCache.php(480): Database->select(string, string, array, string)

#3 /var/www/html/wiki/includes/cache/MessageCache.php(403): MessageCache->loadFromDB(string, NULL)

#4 /var/www/html/wiki/includes/cache/MessageCache.php(325): MessageCache->loadFromDBWithLock(string, array, NULL)

#5 /var/www/html/wiki/includes/cache/MessageCache.php(927): MessageCache->load(string)

#6 /var/www/html/wiki/includes/cache/MessageCache.php(858): MessageCache->getMsgFromNamespace(string, string)

#7 /var/www/html/wiki/includes/cache/MessageCache.php(826): MessageCache->getMessageForLang(Language, string, boolean, array)

#8 /var/www/html/wiki/includes/cache/MessageCache.php(767): MessageCache->getMessageFromFallbackChain(Language, string, boolean)

#9 /var/www/html/wiki/includes/Message.php(1188): MessageCache->get(string, boolean, Language)

#10 /var/www/html/wiki/includes/Message.php(802): Message->fetchMessage()

#11 /var/www/html/wiki/includes/Message.php(902): Message->toString()

#12 /var/www/html/wiki/includes/OutputPage.php(906): Message->text()

#13 /var/www/html/wiki/includes/OutputPage.php(954): OutputPage->setHTMLTitle(Message)

#14 /var/www/html/wiki/includes/OutputPage.php(2369): OutputPage->setPageTitle(string)

#15 /var/www/html/wiki/includes/exception/MWExceptionRenderer.php(162): OutputPage->prepareErrorPage(string)

#16 /var/www/html/wiki/includes/exception/MWExceptionRenderer.php(50): MWExceptionRenderer::reportHTML(DBQueryError)

#17 /var/www/html/wiki/includes/exception/MWExceptionHandler.php(71): MWExceptionRenderer::output(DBQueryError, integer)

#18 /var/www/html/wiki/includes/exception/MWExceptionHandler.php(137): MWExceptionHandler::report(DBQueryError)

#19 /var/www/html/wiki/includes/MediaWiki.php(540): MWExceptionHandler::handleException(DBQueryError)

#20 /var/www/html/wiki/index.php(43): MediaWiki->run()

#21 {main}

2A05:3E00:C:5:0:0:0:101B (talkcontribs)

Seems like apt-get somehow broke your wiki.

The relevant line is:

Error: 1146 Table 'my_wiki.page' doesn't exist (localhost)

Is "my_wiki" the name of your wiki database? Or is this name wrong?

177.53.48.25 (talkcontribs)

Yes, seems like it.

"my_wiki" is the name of my wiki database, It's right.

Seb35 (talkcontribs)

With this report alone I have the same conclusion, but it should be further investigated because it could be a simple misconfiguration.

Can you give more details? In addition of those requested above:

  1. can you say your Linux distribution (Debian, Ubuntu) and version?
  2. you installed the 'mediawiki' package, isn’t it?
  3. what was the old version and what is the new version?
177.53.48.25 (talkcontribs)
  1. Ubuntu 15.10 (GNU/Linux 4.2.0-16-generic x86_64)
  2. I already had the mediawiki instaled. I only made "apt-get update" on Ubuntu
  3. The old version was 1.18.1 until a month ago, then I upgraded it, and now is running the version 1.28.0, but it already make a month and the problem started yesterday after  apt-get update.
Seb35 (talkcontribs)

Sorry for the delay, forgot to monitor this. Can you connect to your database to check what is inside:

  • either with phpMyAdmin, check if there are tables,
  • either with the command line "mysql -u mysqlUser -p mysqlDatabase" then the command "SHOW TABLES;"

There should be between 50 and 100 tables. How many tables has you? Do you see the table "page"? (you shouldn’t given the error says it is missing)

Check also the parameters $wgDBname, $wgDBuser, $wgDBname, $wgDBpassword, $wgDBprefix are correct in LocalSettings.php.

If the parameters are correct but you see some tables are missing, it is probably easier to use a backup (you have a backup, right?).

177.53.48.25 (talkcontribs)

I have 50 tables. And I see the table "page".

The parameters are all corrects too.

Yes, I have a backup and I already ran it, but wasn't resolved.

星耀晨曦 (talkcontribs)