Podręcznik:$wgDBname

From mediawiki.org
This page is a translated version of the page Manual:$wgDBname and the translation is 100% complete.
Ustawienia bazy danych: $wgDBname
Nazwa bazy danych.
Wprowadzono w wersji:pre 1.1.0
Usunięto w wersji:nadal w użyciu
Dozwolone wartości:(łańcuch)
Domyślna wartość:'my_wiki' (1.14+)
'wikidb' (pre-1.1.0 - 1.13)

Szczegóły

Nazwa bazy danych używana przez bieżącą instalację MediaWiki.

Uwaga! Uwaga:
  • Nie zmieniaj $wgDBmwschema po dołączeniu Setup.php . Uwaga: Setup.php inicjalizuje różne ścieżki, włączając niektóre ogólne pliki, uruchamia sesje i inne zadania konfiguracyjne dla żądania. Nie ma to nic wspólnego z instalowaniem lub konfigurowaniem MediaWiki (nie jest to plik instalatora).
  • Only files in includes/db/ should use $wgDBmwschema, while everything else should use the dbSchema() method provided by the Wikimedia\Rdbms\IDatabase interface or extract it from the getDomainId() method in either the Wikimedia\Rdbms\ILoadBalancer or the Wikimedia\Rdbms\ILBFactory interface. The DatabaseDomain 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's database domain. This is also called the local database domain. The 'dbname' and 'tablePrefix' settings in $wgDBservers and $wgLBFactoryConf only define the default DB/prefix when a connection is requested with DatabaseDomain::newUnspecified()->getId() (the empty string) as the database domain, e.g. wfGetDB( DB_REPLICA, [], '' ). Note that functions calls like wfGetDB( DB_REPLICA ), which simply omit the database domain, are assumed to refer to the local database domain.

Zobacz też

  • Manual:Database access – zawiera przegląd dotyczący pracą z bazami danych i silnikami baz danych w MediaWiki.
  • all.dblist - pełna lista baz danych używanych na serwerach Wikimedia