【 TiDB 使用环境`】测试环境
【 TiDB 版本】V5.4
【遇到的问题】
[tidb@test11 ~]$$ tiup cluster display tidb-tianze
[tidb@test11 ~]$ mysql -uroot -h10.172.32.101 -P4000 -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 135
Server version: 5.7.25-TiDB-v5.4.0 TiDB Server (Apache License 2.0) Community Edition, MySQL 5.7 compatible
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
MySQL [(none)]> show databases;
±-------------------+
| Database |
±-------------------+
| INFORMATION_SCHEMA |
| METRICS_SCHEMA |
| PERFORMANCE_SCHEMA |
| mysql |
| test |
±-------------------+
5 rows in set (0.00 sec)
MySQL [(none)]>
这里TiDB Server :10.172.32.101\10.172.32.102\10.172.32.103 三节点都可以对外提供读写。
在实际生产中,如何做负载均衡,或者读写分离。哪种方案应用比较多,例如中间件MySQL Router