Skip to content

Commit

Permalink
Docs: add timeout parameter for MySQL dsn (#4205)
Browse files Browse the repository at this point in the history
Co-authored-by: Davies Liu <[email protected]>
  • Loading branch information
abserari and davies authored Nov 30, 2023
1 parent 5b8610f commit 6acbfc3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/zh_cn/reference/how_to_set_up_metadata_engine.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,22 @@ juicefs format \
pics
```

要启用 JuiceFS 到 MySQL 服务器建立连接的超时控制,请传递 `timeout=5s` 参数(时间可自定义):

```shell
juicefs format \
--storage s3 \
... \
"mysql://user:mypassword@(192.168.1.6:3306)/juicefs?timeout=5s" \
pics
```

:::note 注意

设置建立连接超时,在 JuiceFS 和 MySQL 间出现网络故障场景时,能明确控制对 JuiceFS 文件系统进行读写的阻塞时间,从而可控的对网络故障进行响应。

:::

### 挂载文件系统

```shell
Expand Down

0 comments on commit 6acbfc3

Please sign in to comment.