Related Documentation Download this Manual
PDF (US Ltr) - 324.6Kb
PDF (A4) - 323.4Kb
HTML Download (TGZ) - 64.3Kb
HTML Download (Zip) - 74.9Kb

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

3.4 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.


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