views:

38

answers:

1

According to http://www.php.net/manual/en/mysqlnd.overview.php MySQLND now supports SSL

Does anyone know of any examples of setup of an SSL connection with MySQLND?

Is the assumption that you just use the existing mysqli route but under the hood it's using MySQLND?

+1  A: 

The ND driver is all under the hood. It simply replaces the old linked mysql C library with a PHP native library.

To use SSL for a connection, you just need to use mysqli::ssl_set to pass in the certificate paramaters.

Usage should be pretty straight forward (assuming mysqli):

$db = new mysqli($host, $user, $pass, $db);
$db->ssl_set($key, $cert, $ca, $capath, $cipher);
Ryan Chouinard