Skip to content

Commit 24ed35a

Browse files
authored
Update migrate-large-mysql-to-tidb.md (#22106) (#22177)
1 parent 4f6df89 commit 24ed35a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

migrate-large-mysql-to-tidb.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,18 +124,19 @@ The target TiKV cluster must have enough disk space to store the imported data.
124124

125125
For more information on TiDB Lightning configuration, refer to [TiDB Lightning Configuration](/tidb-lightning/tidb-lightning-configuration.md).
126126

127-
2. Start the import by running `tidb-lightning`. If you launch the program directly in the command line, the process might exit unexpectedly after receiving a SIGHUP signal. In this case, it is recommended to run the program using a `nohup` or `screen` tool. For example:
127+
2. Start the import by running `tidb-lightning`. If you launch the program directly in the command line, the process might exit unexpectedly after receiving a SIGHUP signal. It is not recommended to directly use `nohup` to start a process from the command line. Instead, edit the following script content, for example:
128128

129129
If you import data from S3, pass the SecretKey and AccessKey that have access to the S3 storage path as environment variables to the TiDB Lightning node. You can also read the credentials from `~/.aws/credentials`.
130130

131-
{{< copyable "shell-regular" >}}
132-
133131
```shell
132+
#!/bin/bash
134133
export AWS_ACCESS_KEY_ID=${access_key}
135134
export AWS_SECRET_ACCESS_KEY=${secret_key}
136135
nohup tiup tidb-lightning -config tidb-lightning.toml > nohup.out 2>&1 &
137136
```
138137

138+
Then use the script to start TiDB Lightning.
139+
139140
3. After the import starts, you can check the progress of the import by one of the following methods:
140141

141142
- `grep` the keyword `progress` in the log. The progress is updated every 5 minutes by default.

0 commit comments

Comments
 (0)