Last modified: 2012-08-22 23:20:08 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.
Note that as a workaround, you may be able to add flags to the mysql_connect() calls in DatabaseMySql::open().
You can find the list of flags located at http://www.php.net/manual/en/mysql.constants.php#mysql.client-flags
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.
Certainly worth seeing if we can do the same for Postgres and Oracle at the same
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.