List Members,
let me try to explain what I'm trying to set up. I have two servers. Let's call them master.example and slave.example. I've set up MySQL on both, and have replication working from master to slave. Slave is also running MySQL with --read-only.
I've installed MediaWiki on master and have an rsync cron-job syncing the installation to slave. In other words, the MediaWiki on master and slave are *exactly* the same, including LocalSettings.php.
My goal is to have master using it's own database for both reading and writing and slave to use it's own database for reading and masters database for writing. I've set up $wgDBservers like this:
$wgDBservers = array( array( 'host' => 'master.example', 'dbname' => 'wiki', 'user' => 'wiki', 'password' => '********', 'type' => "mysql", 'load' => 0, ), array( 'host' => 'localhost', 'dbname' => 'wiki', 'user' => 'wiki', 'password' => '********', 'type' => "mysql", 'load' => 1, ), );
From the rather limited documentation available about $wgDBservers, it's my understanding that this should result in MediaWiki reading from the MySQL server at localhost and writing to the MySQL server at master.example.
I have also disabled page counters by setting $wgDisableCounters = true;
The problem is, if I stop MySQL on master and reload a page on slave, I get the following error message:
Sorry! This site is experiencing technical difficulties. Try waiting a few minutes and reloading. (Can't contact the database server: Unknown error (master.example))
So my question is; why does a simple page load on slave trigger an attempt to contact the database on master?
In case it's relevant: MediaWiki 1.11.1 on Debian with MySQL 5.0.32.
Bob