Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 38.4Mb
PDF (A4) - 38.4Mb
PDF (RPM) - 37.7Mb
HTML Download (TGZ) - 10.2Mb
HTML Download (Zip) - 10.3Mb
HTML Download (RPM) - 9.0Mb
Man Pages (TGZ) - 197.4Kb
Man Pages (Zip) - 305.8Kb
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

--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
--no-wizard, --nwDisable 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
--sslEnable an SSL connection. Deprecated in version 1.0.10; use --ssl-mode instead.
--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.