Lets say I have a client that gives me db credentials, and they want to connect to the db with a secure/encrypted. They also enabled ssl in their mysql setup. When they give me their db creds, i dont want to ask them for keys and certs. So is it possible to have a encrypted secure connection via ssl when connecting to the clients db with out those items?
update: so after further tinkering around
$db->ssl_set(NULL, NULL,'/path_to_self_signed_cert/ca.pem',NULL,'');
$db->real_connect('hostname','username','password','dbname',
'port'socket', MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT);`
doing this got me the outcome i wanted after running this
$db->query("SHOW STATUS LIKE 'Ssl_cipher';");
displayed the cipher algorithm instead of being blank
(
[0] => Ssl_cipher
[Variable_name] => Ssl_cipher
[1] => DHE-RSA-AES128-SHA
[Value] => DHE-RSA-AES128-SHA
)
but dont really know why this worked, is a self signed cert the proper way of doing this ?