Documentation Home
MySQL Shell 8.0
Related Documentation Download this Manual
PDF (US Ltr) - 0.6Mb
PDF (A4) - 0.6Mb
HTML Download (TGZ) - 134.4Kb
HTML Download (Zip) - 145.4Kb

MySQL Shell 8.0 (part of MySQL 8.0)


MySQL Shell is an advanced client and code editor for MySQL Server. This document describes the core features of MySQL Shell. In addition to the provided SQL functionality, similar to mysql, MySQL Shell provides scripting capabilities for JavaScript and Python and includes APIs for working with MySQL. X DevAPI enables you to work with both relational and document data, see Using MySQL as a Document Store. AdminAPI enables you to work with InnoDB Cluster, see Using MySQL AdminAPI.

MySQL Shell 8.0 is highly recommended for use with MySQL Server 8.0 and 5.7. Please upgrade to MySQL Shell 8.0. If you have not yet installed MySQL Shell, download it from the download site.

For notes detailing the changes in each release, see the MySQL Shell Release Notes.

For help with using MySQL, please visit the MySQL Forums, where you can discuss your issues with other MySQL users.

Licensing information.  This product may include third-party software, used under license. If you are using a Commercial release of MySQL Shell, see MySQL Shell Commercial License Information User Manual for licensing information, including licensing information relating to third-party software that may be included in this Commercial release. If you are using a Community release of MySQL Shell, see MySQL Shell Community License Information User Manual for licensing information, including licensing information relating to third-party software that may be included in this Community release.

Document generated on: 2020-10-20 (revision: 67773)

Table of Contents

1 MySQL Shell Features
2 Installing MySQL Shell
2.1 Installing MySQL Shell on Microsoft Windows
2.2 Installing MySQL Shell on Linux
2.3 Installing MySQL Shell on macOS
3 Using MySQL Shell Commands
3.1 MySQL Shell Commands
4 Getting Started with MySQL Shell
4.1 Starting MySQL Shell
4.2 MySQL Shell Sessions
4.2.1 Creating the Session Global Object While Starting MySQL Shell
4.2.2 Creating the Session Global Object After Starting MySQL Shell
4.2.3 Scripting Sessions in JavaScript and Python Mode
4.3 MySQL Shell Connections
4.3.1 Connecting using Individual Parameters
4.3.2 Connecting using Unix Sockets and Windows Named Pipes
4.3.3 Using Encrypted Connections
4.3.4 Using Compressed Connections
4.4 Pluggable Password Store
4.4.1 Pluggable Password Configuration Options
4.4.2 Working with Credentials
4.5 MySQL Shell Global Objects
4.6 Using a Pager
5 MySQL Shell Code Execution
5.1 Active Language
5.2 Interactive Code Execution
5.3 Code Autocompletion
5.4 Editing Code
5.5 Code History
5.6 Batch Code Execution
5.7 Output Formats
5.7.1 Table Format
5.7.2 Tab Separated Format
5.7.3 Vertical Format
5.7.4 JSON Format Output
5.7.5 JSON Wrapping
5.7.6 Result Metadata
5.8 API Command Line Interface
6 Extending MySQL Shell
6.1 Reporting with MySQL Shell
6.1.1 Creating MySQL Shell Reports
6.1.2 Registering MySQL Shell Reports
6.1.3 Persisting MySQL Shell Reports
6.1.4 Example MySQL Shell Report
6.1.5 Running MySQL Shell Reports
6.1.6 Built-in MySQL Shell Reports
6.2 Adding Extension Objects to MySQL Shell
6.2.1 Creating User-Defined MySQL Shell Global Objects
6.2.2 Creating Extension Objects
6.2.3 Persisting Extension Objects
6.2.4 Example MySQL Shell Extension Objects
6.3 MySQL Shell Plugins
6.3.1 Creating MySQL Shell Plugins
6.3.2 Creating Plugin Groups
6.3.3 Example MySQL Shell Plugins
7 MySQL Shell Utilities
7.1 Upgrade Checker Utility
7.2 JSON Import Utility
7.2.1 Importing JSON documents with the mysqlsh command interface
7.2.2 Importing JSON documents with the --import command
7.2.3 Conversions for representations of BSON data types
7.3 Parallel Table Import Utility
7.4 Table Export Utility
7.5 Instance Dump Utility, Schema Dump Utility, and Table Dump Utility
7.6 Dump Loading Utility
8 MySQL Shell Logging and Debug
8.1 Application Log
8.2 Verbose Output
8.3 Logging AdminAPI Operations
9 Customizing MySQL Shell
9.1 Working With Startup Scripts
9.2 Adding Module Search Paths
9.2.1 Module Search Path Environment Variables
9.2.2 Module Search Path Variable in Startup Scripts
9.3 Customizing the Prompt
9.4 Configuring MySQL Shell Options
A MySQL Shell Command Reference
A.1 mysqlsh — The MySQL Shell