当我尝试访问我的 MediaWiki 安装时,出现以下信息:
[126acc5486e3f05c51e0c77b] /taerelwiki/index.php/Taerel_Worldbuilding_Wiki Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading or after adding a new extension?
Please see https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Upgrading and https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:How_to_debug for more information.
Error 1932: Table 'taerelwiki.l10n_cache' doesn't exist in engine
Function: LCStoreDB::get
Query: SELECT lc_value FROM `l10n_cache` WHERE lc_lang = 'en-gb' AND lc_key = 'deps' LIMIT 1
Backtrace:
from /var/www/html/taerelwiki/includes/libs/rdbms/database/Database.php(1618)
#0 /var/www/html/taerelwiki/includes/libs/rdbms/database/Database.php(1602): Wikimedia\Rdbms\Database->getQueryException()
#1 /var/www/html/taerelwiki/includes/libs/rdbms/database/Database.php(1576): Wikimedia\Rdbms\Database->getQueryExceptionAndLog()
#2 /var/www/html/taerelwiki/includes/libs/rdbms/database/Database.php(952): Wikimedia\Rdbms\Database->reportQueryError()
#3 /var/www/html/taerelwiki/includes/libs/rdbms/database/Database.php(1708): Wikimedia\Rdbms\Database->query()
#4 /var/www/html/taerelwiki/includes/libs/rdbms/database/Database.php(1661): Wikimedia\Rdbms\Database->select()
#5 /var/www/html/taerelwiki/includes/libs/rdbms/database/DBConnRef.php(103): Wikimedia\Rdbms\Database->selectField()
#6 /var/www/html/taerelwiki/includes/libs/rdbms/database/DBConnRef.php(312): Wikimedia\Rdbms\DBConnRef->__call()
#7 /var/www/html/taerelwiki/includes/language/LCStoreDB.php(61): Wikimedia\Rdbms\DBConnRef->selectField()
#8 /var/www/html/taerelwiki/includes/language/LocalisationCache.php(451): LCStoreDB->get()
#9 /var/www/html/taerelwiki/includes/language/LocalisationCache.php(497): LocalisationCache->isExpired()
#10 /var/www/html/taerelwiki/includes/language/LocalisationCache.php(373): LocalisationCache->initLanguage()
#11 /var/www/html/taerelwiki/includes/language/LocalisationCache.php(314): LocalisationCache->loadItem()
#12 /var/www/html/taerelwiki/includes/language/LanguageFallback.php(106): LocalisationCache->getItem()
#13 /var/www/html/taerelwiki/includes/language/LanguageFactory.php(186): MediaWiki\Languages\LanguageFallback->getAll()
#14 /var/www/html/taerelwiki/includes/language/LanguageFactory.php(144): MediaWiki\Languages\LanguageFactory->newFromCode()
#15 /var/www/html/taerelwiki/includes/libs/MapCacheLRU.php(274): MediaWiki\Languages\LanguageFactory->MediaWiki\Languages\{closure}()
#16 /var/www/html/taerelwiki/includes/language/LanguageFactory.php(141): MapCacheLRU->getWithSetCallback()
#17 /var/www/html/taerelwiki/includes/language/LanguageFactory.php(128): MediaWiki\Languages\LanguageFactory->getRawLanguage()
#18 /var/www/html/taerelwiki/includes/ServiceWiring.php(452): MediaWiki\Languages\LanguageFactory->getLanguage()
#19 /var/www/html/taerelwiki/vendor/wikimedia/services/src/ServiceContainer.php(445): Wikimedia\Services\ServiceContainer::{closure}()
#20 /var/www/html/taerelwiki/vendor/wikimedia/services/src/ServiceContainer.php(411): Wikimedia\Services\ServiceContainer->createService()
#21 /var/www/html/taerelwiki/includes/MediaWikiServices.php(301): Wikimedia\Services\ServiceContainer->getService()
#22 /var/www/html/taerelwiki/includes/MediaWikiServices.php(855): MediaWiki\MediaWikiServices->getService()
#23 /var/www/html/taerelwiki/includes/ServiceWiring.php(2060): MediaWiki\MediaWikiServices->getContentLanguage()
#24 /var/www/html/taerelwiki/vendor/wikimedia/services/src/ServiceContainer.php(445): Wikimedia\Services\ServiceContainer::{closure}()
#25 /var/www/html/taerelwiki/vendor/wikimedia/services/src/ServiceContainer.php(411): Wikimedia\Services\ServiceContainer->createService()
#26 /var/www/html/taerelwiki/includes/MediaWikiServices.php(301): Wikimedia\Services\ServiceContainer->getService()
#27 /var/www/html/taerelwiki/includes/MediaWikiServices.php(1940): MediaWiki\MediaWikiServices->getService()
#28 /var/www/html/taerelwiki/includes/session/SessionManager.php(224): MediaWiki\MediaWikiServices->getUserNameUtils()
#29 /var/www/html/taerelwiki/includes/session/SessionManager.php(130): MediaWiki\Session\SessionManager->__construct()
#30 /var/www/html/taerelwiki/includes/Setup.php(440): MediaWiki\Session\SessionManager::singleton()
#31 /var/www/html/taerelwiki/includes/WebStart.php(86): require_once(string)
#32 /var/www/html/taerelwiki/index.php(44): require(string)
#33 {main}
我尝试运行 update.php 并得到此
MediaWiki 1.39.0 Updater
Your composer.lock file is up to date with current dependencies!
Going to run database updates for taerelwiki
Depending on the size of your database this may take a while!
Abort with control-c in the next five seconds (skip this countdown with --quick) ...0
Wikimedia\Rdbms\DBQueryError from line 1618 of /var/www/html/taerelwiki/includes/libs/rdbms/database/Database.php: Error 1932: Table 'taerelwiki.categorylinks' doesn't exist in engine
Function: DatabaseUpdater::doCollationUpdate
Query: SELECT COUNT(*) FROM `categorylinks` WHERE cl_collation != 'uppercase' LIMIT 1
#0 /var/www/html/taerelwiki/includes/libs/rdbms/database/Database.php(1602): Wikimedia\Rdbms\Database->getQueryException()
#1 /var/www/html/taerelwiki/includes/libs/rdbms/database/Database.php(1576): Wikimedia\Rdbms\Database->getQueryExceptionAndLog()
#2 /var/www/html/taerelwiki/includes/libs/rdbms/database/Database.php(952): Wikimedia\Rdbms\Database->reportQueryError()
#3 /var/www/html/taerelwiki/includes/libs/rdbms/database/Database.php(1708): Wikimedia\Rdbms\Database->query()
#4 /var/www/html/taerelwiki/includes/libs/rdbms/database/Database.php(1661): Wikimedia\Rdbms\Database->select()
#5 /var/www/html/taerelwiki/includes/libs/rdbms/database/DBConnRef.php(103): Wikimedia\Rdbms\Database->selectField()
#6 /var/www/html/taerelwiki/includes/libs/rdbms/database/DBConnRef.php(312): Wikimedia\Rdbms\DBConnRef->__call()
#7 /var/www/html/taerelwiki/includes/installer/DatabaseUpdater.php(1152): Wikimedia\Rdbms\DBConnRef->selectField()
#8 /var/www/html/taerelwiki/includes/installer/DatabaseUpdater.php(510): DatabaseUpdater->doCollationUpdate()
#9 /var/www/html/taerelwiki/maintenance/update.php(202): DatabaseUpdater->doUpdates()
#10 /var/www/html/taerelwiki/maintenance/includes/MaintenanceRunner.php(309): UpdateMediaWiki->execute()
#11 /var/www/html/taerelwiki/maintenance/doMaintenance.php(85): MediaWiki\Maintenance\MaintenanceRunner->run()
#12 /var/www/html/taerelwiki/maintenance/update.php(312): require_once('...')
#13 {main}
root@jammy-bare:/var/www/html/taerelwiki/maintenance#
表格如下SHOW FULL TABLES;
:
MariaDB [taerelwiki]> +------------------------+------------+
-> | Tables_in_taerelwiki | Table_type |
-> +------------------------+------------+
-> | actor | BASE TABLE |
-> | archive | BASE TABLE |
-> | bot_passwords | BASE TABLE |
-> | category | BASE TABLE |
-> | categorylinks | BASE TABLE |
-> | change_tag | BASE TABLE |
-> | change_tag_def | BASE TABLE |
-> | comment | BASE TABLE |
-> | content | BASE TABLE |
-> | content_models | BASE TABLE |
-> | externallinks | BASE TABLE |
-> | filearchive | BASE TABLE |
-> | image | BASE TABLE |
-> | imagelinks | BASE TABLE |
-> | interwiki | BASE TABLE |
-> | ip_changes | BASE TABLE |
-> | ipblocks | BASE TABLE |
-> | ipblocks_restrictions | BASE TABLE |
-> | iwlinks | BASE TABLE |
-> | job | BASE TABLE |
-> | l10n_cache | BASE TABLE |
-> | langlinks | BASE TABLE |
-> | linktarget | BASE TABLE |
-> | log_search | BASE TABLE |
-> | logging | BASE TABLE |
-> | module_deps | BASE TABLE |
-> | objectcache | BASE TABLE |
-> | oldimage | BASE TABLE |
-> | page | BASE TABLE |
-> | page_props | BASE TABLE |
-> | page_restrictions | BASE TABLE |
-> | pagelinks | BASE TABLE |
-> | protected_titles | BASE TABLE |
-> | querycache | BASE TABLE |
-> | querycache_info | BASE TABLE |
-> | querycachetwo | BASE TABLE |
-> | recentchanges | BASE TABLE |
-> | redirect | BASE TABLE |
-> | revision | BASE TABLE |
-> | revision_comment_temp | BASE TABLE |
-> | searchindex | BASE TABLE |
-> | site_identifiers | BASE TABLE |
-> | site_stats | BASE TABLE |
-> | sites | BASE TABLE |
-> | slot_roles | BASE TABLE |
-> | slots | BASE TABLE |
-> | templatelinks | BASE TABLE |
-> | text | BASE TABLE |
-> | updatelog | BASE TABLE |
-> | uploadstash | BASE TABLE |
-> | user | BASE TABLE |
-> | user_autocreate_serial | BASE TABLE |
-> | user_former_groups | BASE TABLE |
-> | user_groups | BASE TABLE |
-> | user_newtalk | BASE TABLE |
-> | user_properties | BASE TABLE |
-> | watchlist | BASE TABLE |
-> | watchlist_expiry | BASE TABLE |
-> +------------------------+------------+
-> 58 rows in set (0.002 sec)
->
问题是 MediaWiki 无法处理这些错误。我认为可能缺少数据库表,但不确定如何恢复它,因为updata.php
第二个代码块显示了错误。