MySQL Shell 8.0  /  Getting Started with MySQL Shell  /  MySQL Shell Global Variables

2.3 MySQL Shell Global Variables

MySQL Shell reserves certain variables as global variables, which are assigned to commonly used objects in scripting. This section describes the available global variables and provides examples of working with them. The global variables are:

  • session represents the global session if one has been established.

  • db represents a schema if one has been defined, for example by a URI type string.

  • dba represents the AdminAPI, a component of InnoDB cluster which enables you to administer clusters of server instances. See InnoDB Cluster.

  • shell provides general purpose functions, for example to configure MySQL Shell.

  • util provides utility functions, for example to check server instances before an upgrade.

Important

These words are reserved and cannot be used, for example as names of variables.