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
`tls=true` enables TLS / SSL encrypted connection to the server with full certificate verification (including hostname). Use `skip-verify` if you want to use a self-signed or invalid certificate (serverside) or use `preferred` to use TLS only when advertised by the server. This is similar to `skip-verify`, but additionally allows a fallback to a connection which is not encrypted. Neither `skip-verify` nor `preferred` add any reliable security. You can use a custom TLS config after registering it with [`mysql.RegisterTLSConfig`](https://godoc.org/github.com/go-sql-driver/mysql#RegisterTLSConfig).
437
+
`tls=true` enables TLS / SSL encrypted connection to the server with full certificate verification (including hostname). Use `skip-verify` if you want to use a self-signed or invalid certificate (server-side) or use `preferred` to use TLS only when advertised by the server. This is similar to `skip-verify`, but additionally allows a fallback to a connection which is not encrypted. Neither `skip-verify` nor `preferred` add any reliable security. You can use a custom TLS config after registering it with [`mysql.RegisterTLSConfig`](https://godoc.org/github.com/go-sql-driver/mysql#RegisterTLSConfig).
438
438
439
439
**TLS Verification Modes:**
440
440
@@ -449,10 +449,12 @@ The `tls-verify` parameter controls how certificates are verified (works with bo
449
449
-`tls-verify=ca`: Verifies CA only, skips hostname check - Equivalent to MySQL's VERIFY_CA mode
450
450
451
451
**Examples:**
452
-
-`?tls=true` - System CA with full verification (default behavior)
453
-
-`?tls=true&tls-verify=ca` - System CA with CA-only verification
454
-
-`?tls=custom` - Custom CA with full verification (default behavior)
455
-
-`?tls=custom&tls-verify=ca` - Custom CA with CA-only verification
452
+
```text
453
+
?tls=true - System CA with full verification (default behavior)
454
+
?tls=true&tls-verify=ca - System CA with CA-only verification
455
+
?tls=custom - Custom CA with full verification (default behavior)
456
+
?tls=custom&tls-verify=ca - Custom CA with CA-only verification
457
+
```
456
458
457
459
##### `tls-verify`
458
460
@@ -462,7 +464,7 @@ Valid Values: identity, ca
462
464
Default: identity
463
465
```
464
466
465
-
Controls the TLS certificate verification level. This parameter works in conjunction with the `tls` parameter:
467
+
Controls the TLS certificate verification level. This parameter works with the `tls` parameter:
466
468
-`identity`: Full verification including hostname (default, most secure)
467
469
-`ca`: CA verification only, without hostname checking (MySQL VERIFY_CA equivalent)
0 commit comments