Last modified: 2012-08-22 23:20:08 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 T34774, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 32774 - Request ability to connect to MySQL using SSL
Request ability to connect to MySQL using SSL
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
unspecified
All All
: Unprioritized enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-02 20:24 UTC by Todd Taft
Modified: 2012-08-22 23:20 UTC (History)
6 users (show)

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


Attachments

Description Todd Taft 2011-12-02 20:24:17 UTC
I'd like to be able to connect to a (remote) MySQL server using SSL connections between the web server and the MySQL server.
Comment 1 Brion Vibber 2011-12-02 20:40:40 UTC
Note that as a workaround, you may be able to add flags to the mysql_connect() calls in DatabaseMySql::open().
Comment 2 Patrick Reilly 2011-12-02 20:48:21 UTC
You can find the list of flags located at http://www.php.net/manual/en/mysql.constants.php#mysql.client-flags
Comment 3 Todd Taft 2011-12-02 21:08:26 UTC
Replacing 

$this->mConn = mysql_pconnect( $realServer, $user, $password );

with

$this->mConn = mysql_pconnect( $realServer, $user, $password, MYSQL_CLIENT_SSL );

and

this->mConn = mysql_connect( $realServer, $user, $password, true );

with

this->mConn = mysql_connect( $realServer, $user, $password, true, MYSQL_CLIENT_SSL );

in includes/db/DatabaseMysql.php seems to work.

It would be nice to have the appropriate magic in the installer (and presumably a variable in LocalSettings.php) to enable this without requiring this minor source code change.
Comment 4 Sam Reed (reedy) 2011-12-02 22:43:56 UTC
Certainly worth seeing if we can do the same for Postgres and Oracle at the same
Comment 5 Tyler Romeo 2012-08-15 20:50:04 UTC
https://gerrit.wikimedia.org/r/19933

Doesn't add installer magic, unfortunately, because I don't have much experience with that. Somebody else can add those options if necessary.

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


Navigation
Links