Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Manual:$wgDBname

From mediawiki.org
Translate this page
Languages:
Database settings: $wgDBname
Name of the database.
Introduced in version:Before 1.1.0
Removed in version:Still in use
Allowed values:(string)
Default value:'my_wiki' (1.14+)
'wikidb' (pre-1.1.0 - 1.13)
Other settings:Alphabetical |By function

Details

[edit]

Name of the database used by current installation of MediaWiki.

Caution!Caution:
  • Do not change$wgDBmwschema afterSetup.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 inincludes/db/ should use$wgDBmwschema, while everything else should use thedbSchema() method provided by theWikimedia\Rdbms\IDatabase interface or extract it from thegetDomainId() method in either theWikimedia\Rdbms\ILoadBalancer or theWikimedia\Rdbms\ILBFactory interface. TheDatabaseDomain class can extract such components from a database domain ID.
  • If you configure$wgDBservers or$wgLBFactoryConf, you still need to define$wgDBname,$wgDBmwschema (if applicable for the DB type), and$wgDBprefix (if applicable for the DB type). The combination of$wgDBname,$wgDBmwschema, and$wgDBprefix define the current wiki'sdatabase domain. This is also called thelocal database domain. The 'dbname' and 'tablePrefix' settings in$wgDBservers and$wgLBFactoryConf only define the default DB/prefix when a connection is requested withDatabaseDomain::newUnspecified()->getId() (the empty string) as the database domain, e.g.wfGetDB( DB_REPLICA, [], '' ). Note that functions calls likewfGetDB( DB_REPLICA ), which simply omit the database domain, are assumed to refer to the local database domain.

See also

[edit]
  • Manual:Database access – contains an overview of working with databases and database engines in MediaWiki.
  • all.dblist - full list of database names used in Wikimedia servers
Retrieved from "https://www.mediawiki.org/w/index.php?title=Manual:$wgDBname&oldid=6628337"
Categories:

[8]ページ先頭

©2009-2025 Movatter.jp