2021-12-02 09:29:50
浏览数 (1)
查看逻辑数据库
代码语言:javascript
复制mysql> show @@database;
----------
| DATABASE |
----------
| TESTDB |
| cctest |
----------
2 rows in set (0.00 sec)
mysql>
查看数据节点
查看所有数据节点
代码语言:javascript
复制mysql> show @@datanode;
------ ---------------- ------- ------- -------- ------ ------ --------- ------------ ---------- --------- ---------------
| NAME | DATHOST | INDEX | TYPE | ACTIVE | IDLE | SIZE | EXECUTE | TOTAL_TIME | MAX_TIME | MAX_SQL | RECOVERY_TIME |
------ ---------------- ------- ------- -------- ------ ------ --------- ------------ ---------- --------- ---------------
| dn1 | localhost1/db1 | 0 | mysql | 0 | 0 | 1000 | 0 | 0 | 0 | 0 | -1 |
| dn2 | localhost1/db2 | 0 | mysql | 0 | 0 | 1000 | 0 | 0 | 0 | 0 | -1 |
| dn3 | localhost1/db3 | 0 | mysql | 0 | 0 | 1000 | 0 | 0 | 0 | 0 | -1 |
| sd1 | h101/my1 | 0 | mysql | 0 | 4 | 100 | 4 | 0 | 0 | 0 | -1 |
| sd2 | h101/my2 | 0 | mysql | 0 | 0 | 100 | 2 | 0 | 0 | 0 | -1 |
| sd3 | h101/my3 | 0 | mysql | 0 | 6 | 100 | 175 | 0 | 0 | 0 | -1 |
| sd4 | h202/my4 | 0 | mysql | 0 | 0 | 100 | 0 | 0 | 0 | 0 | -1 |
| sd5 | h101/my5 | 0 | mysql | 0 | 0 | 100 | 2 | 0 | 0 | 0 | -1 |
------ ---------------- ------- ------- -------- ------ ------ --------- ------------ ---------- --------- ---------------
8 rows in set (0.01 sec)
mysql>
查看某个schema的数据节点
代码语言:javascript
复制mysql> show @@datanode where schema = cctest;
------ ---------- ------- ------- -------- ------ ------ --------- ------------ ---------- --------- ---------------
| NAME | DATHOST | INDEX | TYPE | ACTIVE | IDLE | SIZE | EXECUTE | TOTAL_TIME | MAX_TIME | MAX_SQL | RECOVERY_TIME |
------ ---------- ------- ------- -------- ------ ------ --------- ------------ ---------- --------- ---------------
| sd1 | h101/my1 | 0 | mysql | 0 | 4 | 100 | 4 | 0 | 0 | 0 | -1 |
| sd2 | h101/my2 | 0 | mysql | 0 | 0 | 100 | 2 | 0 | 0 | 0 | -1 |
| sd3 | h101/my3 | 0 | mysql | 0 | 6 | 100 | 180 | 0 | 0 | 0 | -1 |
| sd5 | h101/my5 | 0 | mysql | 0 | 0 | 100 | 2 | 0 | 0 | 0 | -1 |
------ ---------- ------- ------- -------- ------ ------ --------- ------------ ---------- --------- ---------------
4 rows in set (0.01 sec)
mysql>
查看数据源
查看所有数据源
代码语言:javascript
复制mysql> show @@datasource;
---------- -------- ------- ----------------- ------ ------ -------- ------ ------ ---------
| DATANODE | NAME | TYPE | HOST | PORT | W/R | ACTIVE | IDLE | SIZE | EXECUTE |
---------- -------- ------- ----------------- ------ ------ -------- ------ ------ ---------
| sd3 | h101M1 | mysql | 192.168.100.101 | 3306 | W | 0 | 10 | 100 | 194 |
| sd4 | h202M1 | mysql | 192.168.100.202 | 3306 | W | 0 | 0 | 100 | 0 |
| sd1 | h101M1 | mysql | 192.168.100.101 | 3306 | W | 0 | 10 | 100 | 194 |
| sd2 | h101M1 | mysql | 192.168.100.101 | 3306 | W | 0 | 10 | 100 | 194 |
| sd5 | h101M1 | mysql | 192.168.100.101 | 3306 | W | 0 | 10 | 100 | 194 |
| dn2 | hostM1 | mysql | localhost | 3306 | W | 0 | 0 | 1000 | 0 |
| dn2 | hostS1 | mysql | localhost | 3316 | W | 0 | 0 | 1000 | 0 |
| dn3 | hostM1 | mysql | localhost | 3306 | W | 0 | 0 | 1000 | 0 |
| dn3 | hostS1 | mysql | localhost | 3316 | W | 0 | 0 | 1000 | 0 |
| dn1 | hostM1 | mysql | localhost | 3306 | W | 0 | 0 | 1000 | 0 |
| dn1 | hostS1 | mysql | localhost | 3316 | W | 0 | 0 | 1000 | 0 |
---------- -------- ------- ----------------- ------ ------ -------- ------ ------ ---------
11 rows in set (0.00 sec)
mysql>