然后进入MySQL,执行如下操作(如果进不去,报错密码过期,那么在my.cnf文件加入:skip-grant-tables,然后无密码进入数据库: update mysql.user set password_expired="N" where user="root"; 最后把参数从配置文件去掉,重启数据库,用刚才的root密码进入即可。)
MySQL [(none)]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | +--------------------+ 4 rows in set (0.00 sec) MySQL [(none)]> show status like 'wsrep_local_state%'; +---------------------------+--------------------------------------+ | Variable_name | Value | +---------------------------+--------------------------------------+ | wsrep_local_state_uuid | c2ab52e7-67cf-11e8-9d02-e76acee85210 | | wsrep_local_state | 4 | | wsrep_local_state_comment | Synced | +---------------------------+--------------------------------------+ 3 rows in set (0.00 sec) MySQL [(none)]> show status like 'wsrep_cluster_%'; +--------------------------+--------------------------------------+ | Variable_name | Value | +--------------------------+--------------------------------------+ | wsrep_cluster_conf_id | 1 | | wsrep_cluster_size | 1 | | wsrep_cluster_state_uuid | c2ab52e7-67cf-11e8-9d02-e76acee85210 | | wsrep_cluster_status | Primary | +--------------------------+--------------------------------------+ 4 rows in set (0.00 sec) MySQL [(none)]> GRANT RELOAD, LOCK TABLES, PROCESS, REPLICATION CLIENT ON *.* TO 'pxc'@'%' IDENTIFIED BY '123456'; ---创建一个SST用户 MySQL [(none)]> flush privileges; (从上面的信息集群大小为1个节点,状态为primary,节点处于Synced状态,它已完全连接,可以进行write-set replication。 )