cz-sjm 发表于 2018-9-28 12:49:47

Mysql Innodb Cluster测试

# /usr/local/mysql/bin/mysql -u root -h 192.168.115.5 -P 6446 -p  Enter password:
  Welcome to the MySQL monitor.Commands end with ; or \g.

  Your MySQL connection>  Server version: 8.0.11 MySQL Community Server - GPL
  Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  Oracle is a registered trademark of Oracle Corporation and/or its
  affiliates. Other names may be trademarks of their respective
  owners.
  Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  mysql> SELECT @@port;
  +--------+
  | @@port |
  +--------+
  |   3306 |
  +--------+
  1 row in set (0.00 sec)
  mysql> select user,host from mysql.user;
  +----------------------------------+-----------+
  | user                           | host      |
  +----------------------------------+-----------+
  | mysql_innodb_cluster_r0467305354 | %         |
  | mysql_innodb_cluster_r0467308990 | %         |
  | mysql_innodb_cluster_r0467310325 | %         |
  | mysql_router1_2x0gxmyjbatp       | %         |
  | mysql_router1_x017h4ui76aq       | %         |
  | root                           | %         |
  | test                           | %         |
  | mysql.infoschema               | localhost |
  | mysql.session                  | localhost |
  | mysql.sys                        | localhost |
  | mysql_innodb_cluster_r0467286081 | localhost |
  | mysql_innodb_cluster_r0467305354 | localhost |
  | mysql_innodb_cluster_r0467308990 | localhost |
  | mysql_innodb_cluster_r0467310325 | localhost |
  +----------------------------------+-----------+
  14 rows in set (0.00 sec)
  #/usr/local/mysql/bin/mysql -u root -h 192.168.115.5 -P 6447 -p
  Enter password:
  Welcome to the MySQL monitor.Commands end with ; or \g.

  Your MySQL connection>  Server version: 8.0.11 MySQL Community Server - GPL
  Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  Oracle is a registered trademark of Oracle Corporation and/or its
  affiliates. Other names may be trademarks of their respective
  owners.
  Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  mysql> create database yang;
  ERROR 1290 (HY000): The MySQL server is running with the --super-read-only option so it cannot execute this statement
  mysql> select * from performance_schema.replication_group_members;
  +---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+
  | CHANNEL_NAME            | MEMBER_ID                            | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | MEMBER_ROLE | MEMBER_VERSION |
  +---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+
  | group_replication_applier | 7c8712b3-8b2c-11e8-b41f-000c2994965c | vm1         |      3306 | ONLINE       | SECONDARY   | 8.0.11         |
  | group_replication_applier | 862443de-8b2c-11e8-bf4c-000c29c9b5f9 | vm3         |      3306 | ONLINE       | PRIMARY   | 8.0.11         |
  | group_replication_applier | 8852b2af-8b2c-11e8-8487-000c2971a45f | vm2         |      3306 | ONLINE       | SECONDARY   | 8.0.11         |
  +---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+
  3 rows in set (0.37 sec)

页: [1]
查看完整版本: Mysql Innodb Cluster测试