Last modified: 2013-10-23 18:17:11 UTC
When using a remote database with the settings: $wgDBtype = "mysql"; $wgDBserver = "192.168.0.1"; $wgDBport = "2706"; $wgDBname = "wikidb"; $wgDBuser = "root"; The variable $wgDBport is ignored by the mysql database class. Instead you'll have to use the following configuration: $wgDBtype = "mysql"; $wgDBserver = "192.168.0.1:2706"; $wgDBname = "wikidb"; $wgDBuser = "root"; In our case the serverside error was "(Can't contact the database server: Lost connection to MySQL server at 'reading initial communication packet', system error: 111" which is a bit confusing but we tracked it down using wireshark that the default mysql port 3306 was used instead of our port.
This is somewhat a "feature" (in the sense, it was coded to do that explicitly) rather than a bug - though uncommon, it's something MediaWiki should support /** Database port number (for PostgreSQL) */ $wgDBport = 5432; The installer should by default set it to 3306 for mysql But we're going to have this bad state where defaultsettings is going to set it for postgres.. How do we exaclty know if MySQL should use this port, due to its weird state?