Help:Con­figu­ration para­meter "$smwgLocalConnectionConf"

Jump to: navigation, search
edit with form

Configuration parameter details:
Title $smwgLocalConnectionConf
Description Sets the database connection characteristics for providers used
Default setting See below
Software Semantic MediaWiki
Since version
Until version still available
Configuration Installation
Keyword database connector · database · setup · backend · sqlstore · store

$smwgLocalConnectionConf is a configuration parameter that sets the database connection characteristics for providers used. The setting was introduced in Semantic MediaWiki

This configuration parameter may only be used in connection with the usage of a relational database as set with configuration parameter $smwgDefaultStoreSets the storage backend to be used for the semantic data.

Default setting

$smwgLocalConnectionConf => array(
	'mw.db' => array(
		'read'  => DB_SLAVE,
		'write' => DB_MASTER
	'mw.db.queryengine' => array(
		'read'  => DB_SLAVE,
		'write' => DB_MASTER
The default setting will be logged as follows:

Available options and parameters

  • mw.db - Defines the data storage setup
  • mw.db.queryengine - Defines the data retrieval setup
  • DB_MASTER - Specifies the master database
  • DB_SLAVE - Specifies the slave database
  • DB_REPLICA - Specifies the replica slave database (MediaWiki 1.28 and later)

Changing the default setting

Changes to this configuration parameter should ONLY be made by trained professionals to avoid unexpected or unanticipated results when using connection handlers.

To modify this configuration setting, add one of the following lines to your "LocalSettings.php" file after the enableSemantics() call:

Allow to cater for a multi database setup with master and slave databases (data retrieval)
$smwgLocalConnectionConf['mw.db.queryengine'] = array(
	'read' => DB_SLAVE,
	'write' => DB_SLAVE

See also


  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:2534