Open main menu

Manual:$wgAllDBsAreLocalhost

This page is a translated version of the page Manual:$wgAllDBsAreLocalhost and the translation is 36% complete.
Other languages:
English • ‎español • ‎français • ‎magyar • ‎polski • ‎português do Brasil • ‎русский • ‎中文 • ‎日本語
Preferencias de base de datos: $wgAllDBsAreLocalhost
Make all database connections secretly go to localhost.
Introducido en la versión:1.13.0 (r32818)
Eliminado en la versión:1.28.0 (git #5bc9b990)
Valores permitidos:(booleano)
Valor predeterminado:false

Detalles

Make all database connections secretly go to localhost. Fool the load balancer thinking there is an arbitrarily large cluster of servers to connect to. Useful for debugging.

For example you might have a configuration like:

$wgLBFactoryConf = array(
 'class' => 'LBFactoryMulti',
 'sectionsByDB' => array(
    'wikidb' => 's1',
 ),
 'sectionLoads' => array(
    's1' => array(
        'localhost'  => 0,
        'somewhereElse'  => 0,
        'place20'  => 300,
        'place21'  => 300,
        'place3'  => 400,
        'place31'  => 400,
    ),
 ),
 'serverTemplate' => array(
    'dbname'      => $wgDBname,
    'user'          => $wgDBuser,
    'password'      => $wgDBpassword,
    'type'          => 'mysql',
    'flags'          => ( $wgDebugDumpSql ? DBO_DEBUG : 0 ) | DBO_DEFAULT,
    'max lag'      => 30,
    'fakeSlaveLag' => 1, // Needed since the "slaves" aren't really slaves
 ),
);
$wgAllDBsAreLocalhost = true;

Which would cause MediaWiki to behave like it had 6 db servers (1 master + 5 slaves), when really you just have the 1 DB on localhost.

Véase también