Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 37.9Mb
PDF (A4) - 38.0Mb
PDF (RPM) - 36.6Mb
HTML Download (TGZ) - 9.9Mb
HTML Download (Zip) - 9.9Mb
HTML Download (RPM) - 8.7Mb
Man Pages (TGZ) - 207.1Kb
Man Pages (Zip) - 315.5Kb
Info (Gzip) - 3.5Mb
Info (Zip) - 3.5Mb
Excerpts from this Manual

MySQL 5.7 Reference Manual  /  ...  /  mysqlsh — The MySQL Shell

4.5.7 mysqlsh — The MySQL Shell

MySQL Shell is an advanced command-line client and code editor for MySQL. In addition to SQL, MySQL Shell also offers scripting capabilities for JavaScript and Python. For information about using MySQL Shell, see Chapter 18, MySQL Shell User Guide. When MySQL Shell is connected to the MySQL Server through the X Protocol, the X DevAPI can be used to work with both relational and document data, see Chapter 19, Using MySQL as a Document Store. MySQL Shell includes the AdminAPI that enables you to work with InnoDB cluster, see Chapter 20, InnoDB Cluster.

mysqlsh supports the following command-line options.

Table 4.16 mysqlsh Options

Format Description
--auth-method Authentication method to use
--classic Deprecated in version 8.0.3. Create a ClassicSession
--database The schema to use (alias for --schema)
--dba Enable X Protocol on connection with server
--dbpassword Password to use when connecting to server
--dbuser MySQL user name to use when connecting to server
--execute Execute the command and quit
--file File to process in Batch mode
--force Continue in SQL and Batch modes even if errors occur
--help Display help message and exit
--host Connect to MySQL server on given host
--interactive Emulate Interactive mode in Batch mode
--javascript, --js Start in JavaScript mode
--json Print output in JSON format
--log-level Specify logging level
--no-wizard, --nw Disable the connection wizard
--node Deprecated in version 8.0.3. Create a NodeSession
--password Password to use when connecting to server (alias for --dbpassword)
--passwords-from-stdin Read the password from stdin
--port TCP/IP port number for connection
--py, --python Start in Python mode
--recreate-schema Drop and recreate schema
--schema The schema to use
--show-warnings Show warnings after each statement if there are any (in SQL mode)
--socket For connections to localhost, the Unix socket file to use, or pipe name on Windows (ClassicSessions only)
--sql Start in SQL mode
--sqlc Start in SQL mode using a ClassicSession
--sqln Deprecated in version 8.0.3. Start in SQL mode using a NodeSession
--ssl Enable an SSL connection. Deprecated in version 1.0.10; use --ssl-mode instead.
--ssl-ca File that contains list of trusted SSL Certificate Authorities
--ssl-capath Directory that contains trusted SSL Certificate Authority certificate files
--ssl-cert File that contains X509 certificate
--ssl-cipher Name of the SSL cipher to use
--ssl-crl File that contains certificate revocation lists
--ssl-crlpath Directory that contains certificate revocation list files
--ssl-key File that contains X509 key
--ssl-mode Security state of connection to server
--table Display output in tabular format
--tls-version Protocols permitted for encrypted connections
--uri Session information in URI format
--user MySQL user name to use when connecting to server (alias for --dbuser)
--version Display version information and exit
--vertical Display all SQL results vertically


User Comments
Sign Up Login You must be logged in to post a comment.