Configuring MySQL to Use Encrypted Connections To determine whether the current connection with the server uses encryption, check the session value of the  Ssl_cipher  status variable. If the value is empty, the connection is not encrypted. Otherwise, the connection is encrypted and the value indicates the encryption cipher. For example: For the  mysql  client, an alternative is to use the  STATUS  or  \s  command and check the  SSL  line: Or: For some MySQL deployments it may be not only desirable but mandatory to use encrypted connections (for example, to satisfy regulatory requirements). This section discusses configuration settings that enable you to do this. These levels of control are available: To require that clients connect using encrypted connections, enable the  require_secure_transport system variable. For example, put these lines in the server  my.cnf  file: Alternatively, to set and persist the value at runtime, use this statement: [mysqld] require_secure_transport=ON SET PERSIST require_secure_transport=ON; SET PERSIST  sets the value for the running MySQL instance. It also saves the value, causing it to be used for subsequent server restarts. See Section 13.7.6.1, “SET Syntax for Variable Assignment” . With  require_secure_transport  enabled, client connections to the server are required to use some form of secure transport, and the server permits only TCP/IP connections that use SSL, or connections that use a socket file (on Unix) or shared memory (on Windows). The server rejects nonsecure connection attempts, which fail with an  ER_SECURE_TRANSPORT_REQUIRED  error. To invoke a client program such that it requires an encrypted connection whether or not the server requires encryption, use an  --ssl-mode  option value of  REQUIRED ,  VERIFY_CA , or  VERIFY_IDENTITY . For example: mysql --ssl-mode=REQUIRED mysqldump --ssl-mode=VERIFY_CA •You can configure the server to require that clients connect using encrypted connections. •You can invoke individual client programs to require an encrypted connection, even if the server permits but does not require encryption. •You can configure individual MySQL accounts to be usable only over encrypted connections. Configuring Encrypted Connections as Mandatory mysql>  \s ... SSL: Cipher in use is DHE-RSA-AES128-GCM-SHA256 mysql>  \s ... SSL: Not in use ... mysql>  SHOW SESSION STATUS LIKE ’Ssl_cipher’; +---------------+---------------------------+ | Variable_name | Value | +---------------+---------------------------+ | Ssl_cipher | DHE-RSA-AES128-GCM-SHA256 | +---------------+---------------------------+ 1287