5.8.7.2. Using SSL Connections with OpenSSL
To use SSL connections between the MySQL server and client
programs, your system must support either OpenSSL or yaSSL.
This section covers OpenSSL. To use yaSSL, read
Section 5.8.7.3, “Using SSL Connections with yaSSL”, instead.
To get secure connections to work with MySQL and OpenSSL, you
must do the following:
Install the OpenSSL library if it has not already been
installed. We have tested MySQL with OpenSSL 0.9.6. If you
need OpenSSL, visit https://www.openssl.org.
-
When you configure MySQL, invoke the
configure script with the
--with-vio
and
--with-openssl
options:
shell> ./configure --with-vio --with-openssl
Make sure that you have upgraded your grant tables to
include the SSL-related columns in the
mysql.user
table. This is necessary if
your grant tables date from a version prior to MySQL
4.0.0. The upgrade procedure is described in
Section 5.5.2, “mysql_upgrade — Check Tables for MySQL Upgrade”.
-
To check whether a running mysqld
server supports OpenSSL, examine the value of the
have_openssl
system variable:
mysql> SHOW VARIABLES LIKE 'have_openssl';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| have_openssl | YES |
+---------------+-------+
If the value is YES
, the server
supports OpenSSL connections.