-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
*: update the recent improvements about tls/security (#2417)
- Loading branch information
Showing
5 changed files
with
120 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: ALTER INSTANCE | ||
summary: TiDB 数据库中 ALTER INSTANCE 的使用概况。 | ||
category: reference | ||
--- | ||
|
||
# ALTER INSTANCE | ||
|
||
`ALTER INSTANCE` 语句用于对单个 TiDB 实例进行变更操作。目前 TiDB 仅支持 `RELOAD TLS` 子句。 | ||
|
||
## RELOAD TLS | ||
|
||
`ALTER INSTACE RELOAD TLS` 语句用于从原配置的证书 ([`ssl-cert`](/reference/configuration/tidb-server/configuration-file.md#ssl-cert))、密钥 ([`ssl-key`](/reference/configuration/tidb-server/configuration-file.md#ssl-key)) 和 CA ([`ssl-ca`](/reference/configuration/tidb-server/configuration-file.md#ssl-ca)) 的路径重新加证书、密钥和 CA。 | ||
|
||
新加载的证书密钥和 CA 将在语句执行成功后对新建立的连接生效,不会影响语句执行前已建立的连接。 | ||
|
||
在重加载遇到错误时默认会报错返回且继续使用变更前的密钥和证书,但在添加可选的 `NO ROLLBACK ON ERROR` 后遇到错误将不报错并以关闭 TLS 安全连接功能的方式处理后续请求。 | ||
|
||
## 语法图 | ||
|
||
![AlterInstanceStmt](/media/sqlgram/AlterInstanceStmt.png) | ||
|
||
## 示例 | ||
|
||
{{< copyable "sql" >}} | ||
|
||
```sql | ||
ALTER INSTANCE RELOAD TLS; | ||
``` | ||
|
||
## MySQL 兼容性 | ||
|
||
仅支持从原配置路径重加载,不支持动态修改加载路径,也不支持动态启用启动 TiDB 时未开启的 TLS 加密连接功能。 | ||
|
||
## 另请参阅 | ||
|
||
* [Enable Client TLS](/how-to/secure/enable-tls-clients.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters