The member servers in an InnoDB Cluster make use of three types of user accounts. One InnoDB Cluster server configuration account is used to configure the server instances for the cluster. One or more InnoDB Cluster administrator accounts can be created for administrators to manage the server instances after the cluster has been set up. One or more MySQL Router accounts can be created for MySQL Router instances to connect to the cluster. Each of the user accounts must exist on all of the member servers in the InnoDB Cluster, with the same user name and the same password.
In an InnoDB ClusterSet deployment, every member server is part of an InnoDB Cluster, so they require the same types of user accounts. The user accounts from the primary cluster are used for all of the clusters in the deployment. Each of the user accounts must exist on every member server in every cluster in the deployment - both the primary cluster and the replica clusters.
- InnoDB Cluster server configuration account
- 
This account is used to create and configure the member servers of an InnoDB Cluster and InnoDB ClusterSet deployment. Each member server has only one server configuration account. The same user account name and password must be used on every member server in the cluster. You can use the rootaccount on the servers for this purpose, but if you do this, therootaccount on every member server in the cluster must have the same password. This is not recommended for security reasons.The preferred approach is to create the InnoDB Cluster server configuration account using a dba.configureInstance()command with theclusterAdminoption. For better security, specify the password at the interactive prompt, otherwise specify it using theclusterAdminPasswordoption. Create the same account, with the same user name and password, in the same way on every server instance that will be part of the InnoDB Cluster - both the instance to which you connect to create the cluster, and the instances that will join the cluster after that.The dba.configureInstance()command grants the account the required permissions automatically. You may set up the account manually if you prefer, granting it the permissions listed in Configuring InnoDB Cluster Administrator Accounts Manually. The account needs full read and write privileges on the InnoDB Cluster metadata tables, in addition to full MySQL administrator privileges.The InnoDB Cluster server configuration account that you create using the dba.configureInstance()operation is not replicated to other servers in the InnoDB Cluster or in the InnoDB ClusterSet deployment. MySQL Shell disables binary logging for thedba.configureInstance()operation. This means that you must create the account on every server instance individually.In an InnoDB ClusterSet deployment, the same InnoDB Cluster server configuration account must exist on every server instance that is used in the deployment. When you set up a replica cluster, you therefore need to issue a dba.configureInstance()command with theclusterAdminoption to create the account on every server instance that is going to be part of the replica cluster. The command must name the InnoDB Cluster server configuration account from the primary cluster, and you must specify the same password for it. You need to do this step before joining the instances into the replica cluster, so the account is available to configure the replica InnoDB Cluster and the InnoDB ClusterSet deployment metadata and replication.
- InnoDB Cluster administrator accounts
- 
These accounts can be used to administer InnoDB Cluster and InnoDB ClusterSet after you have completed the configuration process. You can set up more than one of them. Each account must exist on every member server in an InnoDB Cluster with the same user name and password, and on every member server of every cluster in an InnoDB ClusterSet deployment. To create an InnoDB Cluster administrator account for an InnoDB ClusterSet deployment, you issue a cluster.setupAdminAccount()cluster.setupAdminAccount()If the primary InnoDB Cluster already existed when you began to set up the InnoDB ClusterSet deployment, an InnoDB Cluster administrator account likely already exists. In that case, you do not need to issue cluster.setupAdminAccount()The replica clusters in an InnoDB ClusterSet deployment must have the same set of InnoDB Cluster administrator accounts as the primary cluster. However, when you create the replica clusters, do not attempt to set up the InnoDB Cluster administrator accounts yourself. The transactions to create accounts with cluster.setupAdminAccount()If a transaction to create an InnoDB Cluster administrator account happened a while back on the primary cluster, it might take some time for the transaction to be replicated and for the account to appear on a replica cluster. Selecting cloning as the provisioning method for the replica cluster speeds up the process. NoteIf the primary InnoDB Cluster was set up in a version before MySQL Shell 8.0.20, the cluster.setupAdminAccount()updateoption to update the privileges of the InnoDB Cluster server configuration account. This is a special use of the command that is not written to the binary log, and is not replicated to the replica clusters.When the InnoDB ClusterSet deployment is complete, you may use cluster.setupAdminAccount()
- InnoDB ClusterSet Replication Accounts
- 
createClusterSet()creates one replication account for each member cluster on the primary member of that cluster. These accounts are named using the format:mysql_innodb_cs_.uniqueIDFor example, in a three-member ClusterSet, accounts similar to the following are created: - mysql_innodb_cs_8269bdfg6 
- mysql_innodb_cs_c24bef67 
- mysql_innodb_cs_ed0bb30c 
 Only one account, the primary, is used for replication. The others are used only if their cluster is promoted to primary. 
- MySQL Router accounts
- 
These accounts are used by MySQL Router to connect to server instances in an InnoDB Cluster and in an InnoDB ClusterSet deployment. You can set up more than one of them. Each account must exist on every member server in an InnoDB Cluster with the same user name and password, or SSL certificate, and on every member server of every cluster in an InnoDB ClusterSet deployment. The process to create a MySQL Router account is the same as for an InnoDB Cluster administrator account, but using a cluster.setupRouterAccount()