Last modified: 2013-10-23 18:17:11 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T38300, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 36300 - DatabaseMysql.php ignores $wgDBport
DatabaseMysql.php ignores $wgDBport
Status: UNCONFIRMED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.18.x
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-27 12:16 UTC by Andreas Perhab
Modified: 2013-10-23 18:17 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Andreas Perhab 2012-04-27 12:16:43 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.
Comment 1 Sam Reed (reedy) 2012-04-27 15:08:26 UTC
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?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links