Does TiDB have something similar to mysqldump that I can use for exporting?

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb有没有类似于mysqldump 这个 这个我是可以导出的

| username: tidb狂热爱好者

[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version]
[Reproduction Path] What operations were performed that caused the issue
[Encountered Issue: Issue Phenomenon and Impact]
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots/Logs/Monitoring]

Is there a corresponding built-in SQL export for importing SQL?
Similar to mysqldump, which I can use for exporting.

| username: zhanggame1 | Original post link

Use dumpling to export TiDB.

| username: onlyacat | Original post link

TiDB created its own dumpling based on mydumper.

| username: 小龙虾爱大龙虾 | Original post link


| username: h5n1 | Original post link

select into outfile

| username: 春风十里 | Original post link

The files exported by TiDB Dumpling are multiple and can only be imported using Lightning. Unlike mysqldump, which exports a single SQL file that can be imported using the source command.

| username: 像风一样的男子 | Original post link

The format exported this way has a bit of a problem.
I used this to export to CSV:
mysql -h$sql_host -P $sql_port -u $sql_user -p"${sql_passwd}" -D database -e “source $sql_sq1” --default-character-set=utf8 | sed ‘s/\t/“,”/g;s/^/“/g;s/$/”/g’ >/data/xxxxx.csv

| username: ShawnYan | Original post link

SELECT * FROM t1 INTO OUTFILE '/tmp/t1.csv'
| username: come_true | Original post link

Dumpling tool

| username: come_true | Original post link

The name of the dumpling tool is almost the same as mysqldump.

| username: Kongdom | Original post link

:+1: :+1: :+1: Learned something new, I didn’t know it could be done this way.

| username: Jellybean | Original post link

This command can be executed.

But remember that it exports data to the machine where the TiDB server is located, not to the directory on the client machine.

| username: dba远航 | Original post link

Dumpling can achieve it.

| username: andone | Original post link

Use dumpling to export

| username: TiDBer_lBAxWjWQ | Original post link

SELECT OUTFILE can also be used.

| username: kelvin | Original post link

Dumpling吧 → Dumpling吧

| username: zhaokede | Original post link

It seems that the majority choose to use Dumpling.

| username: tidb狂热爱好者 | Original post link

Actually, I only need mysqldump.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.