If you open MySQL Shell without specifying connection parameters, MySQL Shell opens without an established global session. It is possible to establish a global session once MySQL Shell has been started using the following Shell Commands:
\connect URI: Creates an XSession.\connect -n URI: Creates a Node Session.\connect -c URI: Creates a Classic Session.
Configure the connection using the URI parameter, which follows
the same syntax as for the --uri
command option. For additional information, see
Section 18.2.2.1, “Connecting using a URI String”.
For example:
mysql-js> \connect root@localhost
Creating XSession to root@localhost...
Enter password: ****
No default schema selected.
mysql-js>
To establish an SSL connection, the URI parameter passed to the connect shell commands must include the SSL information as URL parameters. For example:
mysql-js> \connect root@localhost?ssl_ca=/path/to/ca/file&\
ssl_cert=/path/to/cert/file&ssl_key=/path/to/key/file
Creating XSession to root@localhost...
Enter password: ****
No default schema selected.
mysql-js>