You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tidb-cloud/premium/tidb-cloud-tls-connect-to-premium.md
-243Lines changed: 0 additions & 243 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,249 +38,6 @@ In the [TiDB Cloud console](https://tidbcloud.com/), you can get examples of dif
38
38
39
39
5. Choose your preferred connection method, and then refer to the connection string and sample code on the tab to connect to your instance.
40
40
41
-
The following examples show the connection strings in MySQL, MyCLI, JDBC, Python, Go, and Node.js:
42
-
43
-
<SimpleTab>
44
-
<divlabel="MySQL CLI">
45
-
46
-
MySQL CLI client attempts to establish a TLS connection by default. When you connect to {{{ .premium }}} instances, you need to set `ssl-mode` and `ssl-ca`.
47
-
48
-
```shell
49
-
mysql --connect-timeout 15 --ssl-mode=VERIFY_IDENTITY --ssl-ca=ca.pem --tls-version="TLSv1.2" -u root -h tidb.eqlfbdgthh8.clusters.staging.tidb-cloud.com -P 4000 -D test -p
50
-
```
51
-
52
-
Parameter descriptions:
53
-
54
-
- With `--ssl-mode=VERIFY_IDENTITY`, MySQL CLI client forces to enable TLS and validate {{{ .premium }}} instances.
55
-
- Use `--ssl-ca=<CA_path>` to specify your local path of the downloaded TiDB instance `ca.pem`.
56
-
- Use `--tls-version=TLSv1.2` to restrict the versions of the TLS protocol. If you want to use TLS 1.3, you can set the version to `TLSv1.3`.
57
-
58
-
</div>
59
-
60
-
<divlabel="MyCLI">
61
-
62
-
[MyCLI](https://www.mycli.net/) automatically enables TLS when using TLS related parameters. When you connect to {{{ .premium }}} instances, you need to set `ssl-ca` and `ssl-verify-server-cert`.
- Use `--ssl-ca=<CA_path>` to specify your local path of the downloaded TiDB instance `ca.pem`.
71
-
- With `--ssl-verify-server-cert` to validate {{{ .premium }}} instances.
72
-
73
-
</div>
74
-
75
-
<divlabel="JDBC">
76
-
77
-
[MySQL Connector/J](https://dev.mysql.com/doc/connector-j/en/)'s TLS connection configurations are used here as an example.
78
-
79
-
After downloading the TiDB instance CA certificate, if you want to import it into your operating system, you can use the `keytool -importcert -alias TiDBCACert -file ca.pem -keystore <your_custom_truststore_path> -storepass <your_truststore_password>` command.
80
-
81
-
```shell
82
-
/* Be sure to replace the parameters in the following connection string. */
- Set `ssl: {minVersion: 'TLSv1.2'}` to restrict the versions of the TLS protocol. If you want to use TLS 1.3, you can set the version to `TLSv1.3`.
279
-
- Set `ssl: {ca: fs.readFileSync('<CA_path>')}` to read your local CA path of the downloaded TiDB instance `ca.pem`.
280
-
281
-
</div>
282
-
</SimpleTab>
283
-
284
41
## Manage root certificates for {{{ .premium }}}
285
42
286
43
{{{ .premium }}} uses certificates from [AWS Private Certificate Authority](https://aws.amazon.com/private-ca/) as a Certificate Authority (CA) for TLS connections between clients and {{{ .premium }}} instances. Usually, the private key of the CA certificate is stored securely in AWS-managed hardware security modules (HSMs) that meet [FIPS 140-2 Level 3](https://csrc.nist.gov/projects/cryptographic-module-validation-program/Certificate/3139) security standards.
0 commit comments