Documentation Home
MySQL Shell 8.0
Related Documentation Download this Manual
PDF (US Ltr) - 462.9Kb
PDF (A4) - 459.8Kb
HTML Download (TGZ) - 92.4Kb
HTML Download (Zip) - 103.9Kb


4.2.3.1 Using Encrypted Connections in Code

To establish an encrypted connection, set the SSL information in the connectionData dictionary. For example:

mysql-js> var session=mysqlx.getSession({host: 'localhost',
                                             user: 'root',
                                             password: 'password',
                                             ssl_ca: "path_to_ca_file",
                                             ssl_cert: "path_to_cert_file",
                                             ssl_key: "path_to_key_file"});

See Connecting Using Key-Value Pairs for more information.