一、安装
[root@1app125v ~]# curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6064k 100 6064k 0 0 552k 0 0:00:10 0:00:10 --:--:-- 590k
Successfully set mirror to https://tiup-mirrors.pingcap.com
Detected shell: bash
Shell profile: /root/.bash_profile
Installed path: /root/.tiup/bin/tiup
===============================================
Have a try: tiup playground
===============================================
[root@1app125v ~]# source /root/.bash_profile
[root@1app125v ~]# tiup playground v5.2.1 --db 2 --pd 3 --kv 3 --monitor
Starting component `playground`: /root/.tiup/components/playground/v1.6.0/tiup-playground v5.2.1 --db 2 --pd 3 --kv 3 --monitor
Flag --monitor has been deprecated, Please use --without-monitor to control whether to disable monitor.
Playground Bootstrapping...
The component `prometheus` version v5.2.1 is not installed; downloading from repository.
component prometheus version v5.2.1 is already installed
The component `grafana` version v5.2.1 is not installed; downloading from repository.
component grafana version v5.2.1 is already installed
Start pd instance
The component `pd` version v5.2.1 is not installed; downloading from repository.
component pd version v5.2.1 is already installed
Start pd instance
Start pd instance
Start tikv instance
The component `tikv` version v5.2.1 is not installed; downloading from repository.
component tikv version v5.2.1 is already installed
Start tikv instance
Start tikv instance
Start tidb instance
The component `tidb` version v5.2.1 is not installed; downloading from repository.
component tidb version v5.2.1 is already installed
Start tidb instance
Waiting for tidb instances ready
127.0.0.1:4000 ... Done
127.0.0.1:4001 ... Done
Start tiflash instance
The component `tiflash` version v5.2.1 is not installed; downloading from repository.
component tiflash version v5.2.1 is already installed
Waiting for tiflash instances ready
127.0.0.1:3930 ... Done
CLUSTER START SUCCESSFULLY, Enjoy it ^-^
To connect TiDB: mysql --comments --host 127.0.0.1 --port 4000 -u root -p (no password)
To connect TiDB: mysql --comments --host 127.0.0.1 --port 4001 -u root -p (no password)
To view the dashboard: http://127.0.0.1:2379/dashboard
PD client endpoints: [127.0.0.1:2379 127.0.0.1:2382 127.0.0.1:2384]
To view the Prometheus: http://127.0.0.1:9090
To view the Grafana: http://127.0.0.1:3000
二、连接
[root@1app125v ~]# tiup client
The component `client` version is not installed; downloading from repository.
download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 127.01 KiB / 4.05 MiB 3.06% ? download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 239.01 KiB / 4.05 MiB 5.76% ? download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 351.01 KiB / 4.05 MiB 8.47% ? download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 471.01 KiB / 4.05 MiB 11.36% 5download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 575.01 KiB / 4.05 MiB 13.87% 5download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 695.01 KiB / 4.05 MiB 16.76% 5download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 807.01 KiB / 4.05 MiB 19.46% 5download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 935.01 KiB / 4.05 MiB 22.55% 5download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 1.03 MiB / 4.05 MiB 25.45% 572download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 1.14 MiB / 4.05 MiB 28.15% 574download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 1.26 MiB / 4.05 MiB 31.23% 574download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 1.37 MiB / 4.05 MiB 33.74% 574download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 1.48 MiB / 4.05 MiB 36.44% 574download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 1.59 MiB / 4.05 MiB 39.34% 574download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 1.71 MiB / 4.05 MiB 42.23% 574download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 1.83 MiB / 4.05 MiB 45.13% 575download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 1.93 MiB / 4.05 MiB 47.63% 575download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 2.05 MiB / 4.05 MiB 50.72% 575download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 2.17 MiB / 4.05 MiB 53.62% 576download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 2.28 MiB / 4.05 MiB 56.32% 576download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 2.39 MiB / 4.05 MiB 59.02% 576download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 2.52 MiB / 4.05 MiB 62.30% 578download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 2.62 MiB / 4.05 MiB 64.81% 578download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 2.75 MiB / 4.05 MiB 67.89% 578download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 2.85 MiB / 4.05 MiB 70.40% 576download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 2.96 MiB / 4.05 MiB 73.10% 576download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 3.08 MiB / 4.05 MiB 76.19% 576download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 3.20 MiB / 4.05 MiB 79.08% 578download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 3.32 MiB / 4.05 MiB 81.98% 578download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 3.42 MiB / 4.05 MiB 84.49% 578download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 3.54 MiB / 4.05 MiB 87.38% 578download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 3.65 MiB / 4.05 MiB 90.08% 578download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 3.76 MiB / 4.05 MiB 92.98% 578download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 3.87 MiB / 4.05 MiB 95.68% 577download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 3.98 MiB / 4.05 MiB 98.38% 577download https://tiup-mirrors.pingcap.com/client-v1.6.0-linux-amd64.tar.gz 4.05 MiB / 4.05 MiB 100.00% 603.09 KiB/s
Starting component `client`: /root/.tiup/components/client/v1.6.0/tiup-client
Connected with driver mysql (5.7.25-TiDB-v5.2.1)
Type "help" for help.
my:root@127.0.0.1:4001=> show databases;
Database
--------------------
INFORMATION_SCHEMA
METRICS_SCHEMA
PERFORMANCE_SCHEMA
mysql
test
(5 rows)
my:root@127.0.0.1:4001=>
三、清空
tiup clean --all