Handbuch:$wgDBname
Appearance
From mediawiki.org
This page is a translated version of the page Manual:$wgDBname and the translation is 88% complete.
Languages:
| Datenbank-Einstellungen: $wgDBname | |
|---|---|
| Der Name der Datenbank. |
|
| Eingeführt in Version: | Vor 1.1.0 |
| Entfernt in Version: | Weiterhin vorhanden |
| Erlaubte Werte: | (Zeichenkette) |
| Standardwert: | 'my_wiki' (1.14+)'wikidb' (pre-1.1.0 - 1.13) |
| Andere Einstellungen: Alphabetisch | Nach Funktion | |
Details
Der Name der Datenbank, die von der aktuellen Installation von MediaWiki verwendet wird.
Achtung! Achtung:
- Ändere
$wgDBmwschemanicht, nachdem Setup.php eingeschlossen wurde. Hinweis: 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$wgDBmwschema, while everything else should use the dbSchema() method provided by theWikimedia\Rdbms\IDatabaseinterface or extract it from thegetDomainId()method in either theWikimedia\Rdbms\ILoadBalanceror theWikimedia\Rdbms\ILBFactoryinterface. TheDatabaseDomainclass can extract such components from a database domain ID. - If you configure
$wgDBserversor$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$wgDBprefixdefine the current wiki's database domain. This is also called the local database domain. The 'dbname' and 'tablePrefix' settings in$wgDBserversand$wgLBFactoryConfonly 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.
Siehe auch
- Manual:Datenbank-Zugriff – contains an overview of working with databases and database engines in MediaWiki.
- all.dblist - vollständige Liste der Datenbanknamen, die in Wikimedia-Servern verwendet wird