AdminAPI is provided by MySQL Shell. AdminAPI is accessed
dba global variable and its
associated methods. The
dba variable's methods
provide the operations which enable you to deploy, configure, and
administer InnoDB Cluster, InnoDB ClusterSet, and
InnoDB ReplicaSet. For example, use the
dba.createCluster() method to create an
InnoDB Cluster. In addition, AdminAPI supports administration
of some MySQL Router related tasks, such as creating or upgrading a
user account that works with InnoDB Cluster,
InnoDB ClusterSet, and InnoDB ReplicaSet.
AdminAPI supports the following deployment scenarios:
Production deployment: If you want to use a full production environment, you need to configure the required number of machines and then deploy your server instances to the machines.
Sandbox deployment: If you would like to test a deployment before committing to a full production deployment, the provided sandbox feature enables you to set up a test environment on your local machine. Sandbox server instances are created for you with the required configuration. You can experiment to become familiar with the technologies employed.Important
An AdminAPI sandbox deployment is not suitable for use in a full production environment.
in addition to a native SQL mode. Throughout this guide
Switch modes by issuing
\py for Python mode. Ensure you are
MySQL Shell enables you to connect to servers over a socket connection, but AdminAPI requires TCP connections to a server instance. Socket based connections are not supported in AdminAPI.
This section assumes familiarity with MySQL Shell; see
MySQL Shell 8.0 for further information.
MySQL Shell also provides online help for the AdminAPI. To list
dba commands, use the
dba.help() method. For online help on a
specific method, use the general format
object.help('methodname'). For example, using
mysql-js> dba.help('getCluster') Retrieves a cluster from the Metadata Store. SYNTAX dba.getCluster([name][, options]) WHERE name: Parameter to specify the name of the cluster to be returned. options: Dictionary with additional options. ...
Or using Python:
mysql-py>dba.help('get_cluster') NAME get_cluster - Retrieves a cluster from the Metadata Store. SYNTAX dba.get_cluster([name][, options]) WHERE name: Parameter to specify the name of the cluster to be returned. options: Dictionary with additional options. ...