Abstract
MySQL Shell is an advanced client and code editor for MySQL. 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, InnoDB ClusterSet, and InnoDB ReplicaSet.
MySQL Shell 9.1.0 is highly recommended for use with any GA version of MySQL 8.4, or higher. Please upgrade to MySQL Shell 9.1.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: 2024-12-09 (revision: 80423)
Table of Contents
- 1 MySQL Shell Features
- 2 Installing MySQL Shell
- 3 Using MySQL Shell Commands
- 4 Getting Started with MySQL Shell
- 4.1 Starting MySQL Shell
- 4.2 MySQL Shell Sessions
- 4.3 MySQL Shell Connections
- 4.3.1 Connecting using Individual Parameters
- 4.3.2 Connecting using login-path and Options Files
- 4.3.3 Connecting using Unix Sockets and Windows Named Pipes
- 4.3.4 Using Encrypted Connections
- 4.3.5 Using LDAP and Kerberos Authentication
- 4.3.6 Using OpenID Connect
- 4.3.7 Using an SSH Tunnel
- 4.3.8 Using Compressed Connections
- 4.4 Pluggable Password Store
- 4.5 MySQL Shell Global Objects
- 4.6 Using a Pager
- 4.7 Cloud Service Configuration
- 4.8 OCI Authentication Connection Options
- 5 MySQL Shell Code Execution
- 6 MySQL AdminAPI
- 6.1 Using MySQL AdminAPI
- 6.2 Installing AdminAPI Software Components
- 6.3 Retrieving a Handler Object
- 6.4 Creating User Accounts for AdminAPI
- 6.5 Verbose Logging
- 6.6 Finding the Primary
- 6.7 Scripting AdminAPI
- 6.8 AdminAPI MySQL Sandboxes
- 6.9 Tagging Metadata
- 6.10 Using MySQL Router with AdminAPI, InnoDB Cluster, and InnoDB ReplicaSet
- 6.11 Upgrade Metadata Schema
- 6.12 Locking Mechanism for AdminAPI Operations
- 6.13 Executing SQL on Topologies
- 6.14 Replication Compatibility Checks
- 7 MySQL InnoDB Cluster
- 7.1 InnoDB Cluster Requirements
- 7.2 InnoDB Cluster Limitations
- 7.3 User Accounts for InnoDB Cluster
- 7.4 Deploying a Production InnoDB Cluster
- 7.4.1 Pre-Checking Instance Configuration for InnoDB Cluster Usage
- 7.4.2 Configuring Production Instances for InnoDB Cluster Usage
- 7.4.3 Creating an InnoDB Cluster
- 7.4.4 Adding Instances to an InnoDB Cluster
- 7.4.5 Configuring InnoDB Cluster Ports
- 7.4.6 Using MySQL Clone with InnoDB Cluster
- 7.4.7 Adopting a Group Replication Deployment
- 7.5 Configuring InnoDB Cluster
- 7.5.1 Setting Options for InnoDB Cluster
- 7.5.2 Customizing InnoDB Cluster Member Servers
- 7.5.3 Configuring the Election Process
- 7.5.4 Configuring Failover Consistency
- 7.5.5 Configuring Automatic Rejoin of Instances
- 7.5.6 Configuring the Parallel Replication Applier
- 7.5.7 InnoDB Cluster and Auto-increment
- 7.5.8 InnoDB Cluster and Binary Log Purging
- 7.5.9 Configuring the Group Replication Communication Stack
- 7.6 Securing InnoDB Cluster
- 7.7 Monitoring InnoDB Cluster
- 7.8 Restoring and Rebooting an InnoDB Cluster
- 7.9 Modifying or Dissolving an InnoDB Cluster
- 7.10 Upgrade InnoDB Cluster
- 7.11 MySQL InnoDB Cluster Read Replicas
- 8 MySQL InnoDB ClusterSet
- 8.1 InnoDB ClusterSet Requirements
- 8.2 InnoDB ClusterSet Limitations
- 8.3 User Accounts for InnoDB ClusterSet
- 8.4 Deploying InnoDB ClusterSet
- 8.5 Integrating MySQL Router With InnoDB ClusterSet
- 8.6 InnoDB ClusterSet Status and Topology
- 8.7 InnoDB ClusterSet Controlled Switchover
- 8.8 InnoDB ClusterSet Emergency Failover
- 8.9 InnoDB ClusterSet Repair and Rejoin
- 8.10 Dissolving a ClusterSet
- 8.11 Upgrade InnoDB ClusterSet
- 9 MySQL InnoDB ReplicaSet
- 9.1 Deploying InnoDB ReplicaSet
- 9.2 Configuring InnoDB ReplicaSet Instances
- 9.3 Creating an InnoDB ReplicaSet
- 9.4 Asynchronous Replication Channel Options
- 9.5 Adding Instances to a ReplicaSet
- 9.6 Adopting an Existing Replication Setup
- 9.7 Changing the Primary Instance
- 9.8 Forcing a New Primary Instance
- 9.9 Tagging ReplicaSets
- 9.10 Checking the Status of InnoDB ReplicaSet
- 9.11 Upgrade InnoDB ReplicaSet
- 9.12 Dissolving a ReplicaSet
- 9.13 Rescanning a ReplicaSet
- 9.14 Describing a ReplicaSet
- 10 Extending MySQL Shell
- 11 MySQL Shell Utilities
- 12 MySQL Shell Logging and Debug
- 13 Customizing MySQL Shell
- A MySQL Shell Command Reference
- Index