Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update migration-tidb-faq.md #5855

Merged
merged 7 commits into from
May 8, 2021
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions faq/migration-tidb-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,57 @@ aliases: ['/docs-cn/dev/faq/migration-tidb-faq/']

TiDB 支持绝大多数 MySQL 语法,一般不需要修改代码。

### 导入导出速度慢,各组件日志中出现大量重试、EOF 错误并且没有其他错误

在没有其他逻辑出错的情况下,重试、EOF 可能是由网络问题引起的,建议首先使用相关工具排查网络连通状况。以下示例使用 [iperf](https://iperf.fr/) 进行排查:


+ 在出现重试、EOF 错误的服务器端节点执行以下命令:

{{< copyable "shell-regular" >}}

```shell
iperf3 -s
```

+ 在出现重试、EOF 错误的服务器端节点执行以下命令:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo fixed in #6228.


{{< copyable "shell-regular" >}}

```shell
iperf3 -c <server-IP>
```


下面是一个网络连接良好的客户端节点的输出

```
$ iperf3 -c 192.168.196.58
Connecting to host 192.168.196.58, port 5201
[ 5] local 192.168.196.150 port 55397 connected to 192.168.196.58 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 18.0 MBytes 150 Mbits/sec
[ 5] 1.00-2.00 sec 20.8 MBytes 175 Mbits/sec
[ 5] 2.00-3.00 sec 18.2 MBytes 153 Mbits/sec
[ 5] 3.00-4.00 sec 22.5 MBytes 188 Mbits/sec
[ 5] 4.00-5.00 sec 22.4 MBytes 188 Mbits/sec
[ 5] 5.00-6.00 sec 22.8 MBytes 191 Mbits/sec
[ 5] 6.00-7.00 sec 20.8 MBytes 174 Mbits/sec
[ 5] 7.00-8.00 sec 20.1 MBytes 168 Mbits/sec
[ 5] 8.00-9.00 sec 20.8 MBytes 175 Mbits/sec
[ 5] 9.00-10.00 sec 21.8 MBytes 183 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.00 sec 208 MBytes 175 Mbits/sec sender
[ 5] 0.00-10.00 sec 208 MBytes 174 Mbits/sec receiver

iperf Done.
```

如果输出中网络带宽较低、带宽波动大,会导致各组件出现上述状况。这需要咨询网络服务供应商提升网络质量。

如果输出中各指标良好,请尝试更新各组件版本。更新后无法解决的问题,请移步 [AskTUG 论坛](https://asktug.com/)寻求帮助。

### 不小心把 MySQL 的 user 表导入到 TiDB 了,或者忘记密码,无法登录,如何处理?

重启 TiDB 服务,配置文件中增加 `-skip-grant-table=true` 参数,无密码登录集群后,可以根据情况重建用户,或者重建 mysql.user 表,具体表结构搜索官网。
Expand Down