手册:$wgDBname

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgDBname and the translation is 45% complete.

Other languages:
Deutsch • ‎English • ‎Nederlands • ‎català • ‎español • ‎français • ‎italiano • ‎magyar • ‎polski • ‎português • ‎português do Brasil • ‎suomi • ‎русский • ‎فارسی • ‎中文 • ‎日本語
数据库设置: $wgDBname
数据库名称。
引进版本:pre 1.1.0
移除版本:仍在使用
允许的值:(字符串)
默认值:'wikidb'
其他设置: 按首字母排序 | 按功能排序

详情

Name of the database used by current installation of MediaWiki.

小心! 小心:
  • Do not change $wgDBname after Setup.php has been included. Note: Setup.php initializes various paths, includes some common files, starts sessions, and performs various other setup tasks for a request. It is not related to the installation or setup of MediaWiki.
  • Only files in includes/db/ should use $wgDBname, everything else should use the getDBname() method provided by the Wikimedia\Rdbms\IDatabase interface.


参见

  • 手册:数据库访问 – contains an overview of working with databases and database engines in MediaWiki.
  • all.dblist - full list of database names used in Wikimedia servers