Name
mysql_ssl_set()
Synopsis
my_bool mysql_ssl_set(MYSQL *mysql,
const char *key_path,
const char *cert_path, const char *ca_path,
const char *pem_path, const char *cipher)This function makes a secure connection with SSL. OpenSSL
must be enabled in order to use it. Call it before calling
mysql_real_connect(). This function returns
zero unless there is a problem, in which case an error will be
returned when mysql_real_connect() is called.
The key_path is the path to the key to be
used; cert_path is the path to the
certificate file; ca_path is the file path
of the certificate authority file; pem_path
is the directory with trusted SSL CA certificates, which are in the
pem format; and finally,
cipher contains a list of ciphers permitted
for SSL encryption. You can give NULL for parameters that don’t
apply.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access