Documentation Home
MySQL 8.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 33.8Mb
PDF (A4) - 33.8Mb
PDF (RPM) - 31.8Mb
HTML Download (TGZ) - 8.1Mb
HTML Download (Zip) - 8.2Mb
HTML Download (RPM) - 7.0Mb
Man Pages (TGZ) - 145.9Kb
Man Pages (Zip) - 206.8Kb
Info (Gzip) - 3.1Mb
Info (Zip) - 3.1Mb


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

Pre-General Availability Draft: 2017-11-23

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 19, 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 20, Using MySQL as a Document Store. MySQL Shell includes the AdminAPI that enables you to work with InnoDB cluster, see Chapter 22, InnoDB Cluster.

mysqlsh supports the following command-line options.

Table 4.14 mysqlsh Options

FormatDescription
--auth-methodAuthentication method to use
--classicDeprecated in version 8.0.3. Create a ClassicSession
--databaseThe schema to use (alias for --schema)
--dbaEnable X Protocol on connection with server
--dbpasswordPassword to use when connecting to server
--dbuserMySQL user name to use when connecting to server
--executeExecute the command and quit
--fileFile to process in Batch mode
--forceContinue in SQL and Batch modes even if errors occur
--helpDisplay help message and exit
--hostConnect to MySQL server on given host
--interactiveEmulate Interactive mode in Batch mode
--javascript, --jsStart in JavaScript mode
--jsonPrint output in JSON format
--log-levelSpecify logging level
--mysqlCreate a session using MySQL protocol
--mysqlxCreate a session using X Protocol
--no-wizardDisable the connection wizard
--nodeDeprecated in version 8.0.3. Create a NodeSession
--passwordPassword to use when connecting to server (alias for --dbpassword)
--passwords-from-stdinRead the password from stdin
--portTCP/IP port number for connection
--py, --pythonStart in Python mode
--recreate-schemaDrop and recreate schema
--schemaThe schema to use
--show-warningsShow warnings after each statement if there are any (in SQL mode)
--socketFor connections to localhost, the Unix socket file to use, or pipe name on Windows (ClassicSessions only)
--sqlStart in SQL mode
--sqlcStart in SQL mode using a ClassicSession
--sqlnDeprecated in version 8.0.3. Start in SQL mode using a NodeSession
--sqlxStart in SQL mode using an X Protocol connection
--sslEnable an SSL connection. Deprecated in version 1.0.10. Use --ssl-mode.
--ssl-caFile that contains list of trusted SSL Certificate Authorities
--ssl-capathDirectory that contains trusted SSL Certificate Authority certificate files
--ssl-certFile that contains X509 certificate
--ssl-cipherName of the SSL cipher to use
--ssl-crlFile that contains certificate revocation lists
--ssl-crlpathDirectory that contains certificate revocation list files
--ssl-keyFile that contains X509 key
--ssl-modeSecurity state of connection to server
--tableDisplay output in tabular format
--tls-versionProtocols permitted for encrypted connections
--uriSession information in URI format
--userMySQL user name to use when connecting to server (alias for --dbuser)
--versionDisplay version information and exit
--verticalDisplay all SQL results vertically


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