1. #获取集群状态
    2. dba.getCluster().status();
    3. #连接集群内其他实例
    4. shell.connect('root@server-1');
    5. #检查集群是否可用
    6. dba.checkInstanceConfiguration("root@node-1:3305");
    7. #删除节点
    8. cluster.removeInstance('root@host:3306',{force:true});
    9. #加入节点
    10. cluster.addInstance("root@hostname:3306");
    11. #查看进程
    12. show processlist;
    13. #查看主节点状态
    14. show master status;
    15. #查询没有主键的表
    16. SELECT CONCAT(t.table_schema,".",t.table_name) as table_name
    17. FROM information_schema.TABLES t
    18. LEFT JOIN information_schema.TABLE_CONSTRAINTS tc
    19. ON t.table_schema = tc.table_schema
    20. AND t.table_name = tc.table_name
    21. AND tc.constraint_type = 'PRIMARY KEY'
    22. WHERE tc.constraint_name IS NULL
    23. AND t.table_type = 'BASE TABLE';