[wp-hackers] mysql ssl connection?
Dion Hulse (dd32)
wordpress at dd32.id.au
Sun Feb 26 08:04:01 UTC 2012
WordPress itself doesn't support setting the connection to SSL,
however, it does offer the ability to use a different Database engine
through the usage of the wp-content/db.php dropins.
As a result, It's possible to create a new DB class which does support
the MySQL SSL constant.
I've just done so, and I tried testing, but, even with the SSL
constant set as the PHP manual says.. it connected to my non-ssl mysql
instance without fault.. So i've got no idea if it just falls back to
non-ssl, or if there was something wrong with the mysql_connect()
command.
It's based on the trunk database file, and altered slightly to account
for the missing functions.. as a result, if it fails to connect to the
server, you won't get the WordPressy message, you'll just get my lame
error message. Feel free to customise as you see fit.
here's the file you'll need to place in wp-content/db.php:
http://pastebin.com/caZpUfZm
On 26 February 2012 18:24, Daniel Fenn <danielx386 at gmail.com> wrote:
> Hello all,
>
> I'm working on a setup where Apache and php is installed on one server
> while mysql is configured on a second server on the same network. I
> have been able to get mysql setup to use ssl when connecting to the
> database.
>
> My question is, how would I go about getting wordpress to connect to
> the database over ssl?
>
> (please note that I am not 100% sure if it a wordpress thing or I need
> to set it up on the php.ini file)
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list