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

Add description about --initialize-sql-file option #12681

Merged
merged 2 commits into from
Feb 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions command-line-flags-for-tidb-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ aliases: ['/docs-cn/dev/command-line-flags-for-tidb-configuration/','/docs-cn/de
- 在安全模式下启动 tidb-server
- 默认:false

## `--initialize-sql-file`

- 用于指定 TiDB 集群初次启动时执行的 SQL 脚本。参考[配置项 `initialize-sql-file`](/tidb-configuration-file.md#initialize-sql-file-从-v660-版本开始引入)
- 默认:""

## `-L`

+ Log 级别
Expand Down
7 changes: 7 additions & 0 deletions tidb-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,13 @@ TiDB 配置文件比命令行参数支持更多的选项。你可以在 [config/
+ 默认值:true
+ 当该配置项值为 `true` 时,`KILL` 语句和 `KILL TIDB` 语句均能跨节点终止查询或连接,无需担心错误地终止其他查询或连接。当你使用客户端连接到任何一个 TiDB 节点执行 `KILL` 语句或 `KILL TIDB` 语句时,该语句会被转发给对应的 TiDB 节点。当客户端和 TiDB 中间有代理时,`KILL` 语句或 `KILL TIDB` 语句也会被转发给对应的 TiDB 节点执行。目前暂时不支持在 `enable-global-kill` 为 `true` 时用 MySQL 命令行 <kbd>ctrl</kbd>+<kbd>c</kbd> 终止查询或连接。关于 `KILL` 语句的更多信息,请参考 [KILL [TIDB]](/sql-statements/sql-statement-kill.md)。

### `initialize-sql-file` <span class="version-mark">从 v6.6.0 版本开始引入</span>

+ 用于指定 TiDB 集群初次启动时执行的 SQL 脚本。
+ 默认值:""
+ 脚本中的所有 SQL 语句将以最高权限执行,不会进行权限检查。若指定的 SQL 脚本无法正确执行,可能导致 TiDB 集群启动失败。
+ 通常用于修改系统变量的值,或者创建用户、分配权限等。
shichun-0415 marked this conversation as resolved.
Show resolved Hide resolved

### `enable-forwarding` <span class="version-mark">从 v5.0.0 版本开始引入</span>

+ 控制 TiDB 中的 PD client 以及 TiKV client 在疑似网络隔离的情况下是否通过 follower 将请求转发给 leader。
Expand Down