请问安装失败后,如何卸载TiDB

请问TiDB安装失败,如何彻底卸载?谢谢。

[tidb@tidb ~]$ tiup clean --all 执行这个命令发现这不是卸载,不知道清理了些什么程序。

[tidb@tidb ~]$ tiup cluster list
Name User Version Path PrivateKey


[tidb@tidb ~]$

[tidb@tidb ~]$ ll .tiup/
total 4
drwxr-xr-x. 2 tidb admin 69 Nov 1 11:57 bin
drwxr-xr-x. 10 tidb admin 121 Nov 1 11:33 components
drwxr-xr-x. 3 tidb admin 21 Nov 1 12:01 data
drwxr-xr-x. 2 tidb admin 28 Nov 1 10:46 history
drwxr-xr-x. 2 tidb admin 56 Nov 1 11:34 logs
drwxr-xr-x 2 tidb admin 296 Nov 1 12:01 manifests
drwxr-xr-x. 4 tidb admin 39 Nov 1 11:34 storage
drwxr-xr-x. 2 tidb admin 6 Nov 1 10:46 telemetry
-rw-r–r–. 1 tidb admin 44 Nov 1 11:57 tiup.toml

[tidb@tidb ~]$ tiup playground v8.3.0 --db 2 --pd 3 --kv 3 --monitor --host 192.168.1.134
Checking updates for component playground… Flag --monitor has been deprecated, Please use --without-monitor to control whether to disable monitor.
Start pd instance: v8.3.0
Start pd instance: v8.3.0
Start pd instance: v8.3.0
Start tikv instance: v8.3.0
Start tikv instance: v8.3.0
Start tikv instance: v8.3.0
Start tidb instance: v8.3.0
Start tidb instance: v8.3.0
Waiting for tidb instances ready
192.168.1.134:4000 … Done
192.168.1.134:4001 … Done
Start tiflash instance: v8.3.0
Waiting for tiflash instances ready
192.168.1.134:3930 … Done

:tada: TiDB Playground Cluster is started, enjoy!

Connect TiDB: mysql --comments --host 192.168.1.134 --port 4000 -u root
Connect TiDB: mysql --comments --host 192.168.1.134 --port 4001 -u root
TiDB Dashboard: http://192.168.1.134:2379/dashboard
Grafana: http://192.168.1.134:3000

tiup cluster destroy是卸载
,clean 是清理数据

tiup clean --all 是清理相关组件的。
用tiup cluster destroy 来卸载 ,有问题直接 --force 强制卸载即可

clean 可以删除 data-dir 或者 log-dir下面的内容;
destroy 这个是卸载tidb的

tiup cluster clean [flags] 清理数据
tiup cluster destroy [flags] 删除集群
参考tidb 文档:
https://docs.pingcap.com/zh/tidb/stable/tiup-component-cluster-destroy

1 个赞