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 #12306

Merged
merged 3 commits into from
Feb 8, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
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 @@ -57,6 +57,11 @@ When you start the TiDB cluster, you can use command-line options or environment
- Bootstraps tidb-server in secure mode
- Default: `false`

## `--initialize-sql-file`

- The SQL script to be executed when the TiDB cluster is started for the first time. For details, see [configuration item `initialize-sql-file`](/tidb-configuration-file.md#initialize-sql-file-new-in-v660)
- Default: ""
shichun-0415 marked this conversation as resolved.
Show resolved Hide resolved

## `-L`

- The log level
Expand Down
7 changes: 7 additions & 0 deletions tidb-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,13 @@ The TiDB configuration file supports more options than command-line parameters.
+ Default value: `true`
+ When the value is `true`, both `KILL` and `KILL TIDB` statements can terminate queries or connections across instances so you do not need to worry about erroneously terminating queries or connections. When you use a client to connect to any TiDB instance and execute the `KILL` or `KILL TIDB` statement, the statement will be forwarded to the target TiDB instance. If there is a proxy between the client and the TiDB cluster, the `KILL` and `KILL TIDB` statements will also be forwarded to the target TiDB instance for execution. Currently, using the MySQL command line <kbd>ctrl</kbd>+<kbd>c</kbd> to terminate a query or connection in TiDB is not supported when `enable-global-kill` is `true`. For more information on the `KILL` statement, see [KILL](/sql-statements/sql-statement-kill.md).

### `initialize-sql-file` <span class="version-mark">New in v6.6.0</span>

+ Specifies the SQL script to be executed when the TiDB cluster is started for the first time.
+ Default value: ""
shichun-0415 marked this conversation as resolved.
Show resolved Hide resolved
+ All SQL statements in this script are executed with the highest privilege without any privilege check. If the specified SQL script fails to execute, the TiDB cluster might fail to start.
+ This configuration item is used to perform such operations as modifying the value of a system variable, creating a user, or granting privileges.

### `enable-forwarding` <span class="version-mark">New in v5.0.0</span>

+ Controls whether the PD client and TiKV client in TiDB forward requests to the leader via the followers in the case of possible network isolation.
Expand Down