Using encrypted connections is possible when connecting to a TLS (sometimes referred to as SSL) enabled MySQL server. Much of the configuration of MySQL Shell is based on the options used by MySQL server, see Using Encrypted Connections for more information.
To configure an encrypted connection at startup of MySQL Shell, use the following command options:
--ssl-mode: This option specifies the desired security state of the connection to the server.
--ssl-ca=: The path to a file in PEM format that contains a list of trusted SSL Certificate Authorities.
--ssl-capath=: The path to a directory that contains trusted SSL Certificate Authority certificates in PEM format.
--ssl-cert=: The name of the SSL certificate file in PEM format to use for establishing an encrypted connection.
--ssl-cipher=: The name of the SSL cipher to use for establishing an encrypted connection.
--ssl-key=: The name of the SSL key file in PEM format to use for establishing an encrypted connection.
--ssl-crl=: The path to a file containing certificate revocation lists in PEM format.
--ssl-crlpath=: The path to a directory that contains files containing certificate revocation lists in PEM format.
--tls-version=: The TLS protocols permitted for encrypted connections.
Alternatively, the SSL options can be encoded as part of a
URI-like connection string as part of the query element. The
available SSL options are the same as those listed above, but
written without the preceding hyphens. For example,
ssl-ca is the equivalent of
Paths specified in a URI-like string must be percent encoded, for example:
firstname.lastname@example.org?ssl-ca%3D%2Froot%2Fclientcert%2Fca-cert.pem%26ssl-cert%3D%2Fro\ ot%2Fclientcert%2Fclient-cert.pem%26ssl-key%3D%2Froot%2Fclientcert%2Fclient-key .pem
See Connecting to the Server Using URI-Like Strings or Key-Value Pairs for more information.