Manual: $wgDBname

From mediawiki.org
This page is a translated version of the page Manual:$wgDBname and the translation is 100% complete.
Preferencias de base de datos: $wgDBname
Nombre de la base de datos.
Introducido en la versión:pre 1.1.0
Eliminado en la versión:aún se usa
Valores permitidos:(cadena)
Valor predeterminado:'my_wiki' (1.14+)
'wikidb' (pre-1.1.0 - 1.13)

Detalles

Nombre de la base de datos utilizada por la instalación actual de MediaWiki.

¡Atención! Atención:
  • No modifiques el valor de $wgDBmwschema después de que se haya incluido Setup.php . Nota: Setup.php inicializa varias rutas, incluye algunos archivos comunes, inicia sesiones y realiza algunas otras tareas de configuración cuando se recibe una petición. No guarda relación con la instalación ni con la configuración de MediaWiki.
  • 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.

Véase también

  • Manual:Acceso a base de datos – contiene un repaso de cómo trabajar con bases de datos y motores de bases de datos en MediaWiki
  • all.dblist - lista completa de nombres de bases de datos utilizados en los servidores de Wikimedia