tidb-toolkit/bin/dumpling --host $hostname -uroot -p$pw -P 4000 --filetype csv -S "select member_id destinct from mydb.orders"
Release version: v4.0.7
...
[2021/01/06 02:52:02.510 +00:00] [INFO] [config.go:158] ["detect server type"] [type=TiDB]
...
[2021/01/06 02:52:12.549 +00:00] [WARN] [dump.go:104] ["If the amount of data to dump is large, criteria: (data more than 60GB or dumped time more than 10 minutes)\
you'd better adjust the tikv_gc_life_time to avoid export failure due to TiDB GC during the dump process.\
Before dumping: run sql `update mysql.tidb set VARIABLE_VALUE = '720h' where VARIABLE_NAME = 'tikv_gc_life_time';` in tidb.\
After dumping: run sql `update mysql.tidb set VARIABLE_VALUE = '10m' where VARIABLE_NAME = 'tikv_gc_life_time';` in tidb.\
"]
[2021/01/06 02:52:13.479 +00:00] [INFO] [sql.go:168] ["dump data from sql"] [sql="select member_id destinct from mydb.orders"]
[2021/01/06 02:55:26.919 +00:00] [INFO] [main.go:216] ["dump data successfully, dumpling will exit now"]
[ec2-user@ip-10-113-208-150 ~]$ cd export-2021-01-06T02\:52\:02Z/
[ec2-user@ip-10-113-208-150 export-2021-01-06T02:52:02Z]$ ls -l
total 5436388
-rwxr-xr-x 1 ec2-user ec2-user 139 Jan 6 02:55 metadata
-rwxr-xr-x 1 ec2-user ec2-user 5566853696 Jan 6 02:55 result.0.csv