Repository navigation
TLS
imshooter edited this page Nov 29, 2026
·
1 revision
A connection uses TLS when any option of TLS is given. It then never runs without it, and fails when the server answers without TLS.
| Option | In mysql.ini
|
Value |
|---|---|---|
SSL_ENABLE |
ssl_enable |
require TLS |
SSL_VERIFY |
ssl_verify |
verify the certificate of the server and its name |
SSL_CA_FILE |
ssl_ca_file |
certificate authorities, a file |
SSL_CA_PATH |
ssl_ca_path |
certificate authorities, a folder |
SSL_CRL_FILE |
ssl_crl_file |
revocation lists, a file |
SSL_CRL_PATH |
ssl_crl_path |
revocation lists, a folder |
SSL_CERT_FILE |
ssl_cert_file |
certificate of the client |
SSL_KEY_FILE |
ssl_key_file |
key of the client |
SSL_CIPHER |
ssl_cipher |
ciphers allowed |
TLS_VERSION |
tls_version |
versions allowed, as TLSv1.2,TLSv1.3
|
SSL_FINGERPRINT |
ssl_fingerprint |
SHA1 to SHA512 fingerprint the certificate of the server must have |
On localhost, 127.0.0.1 and ::1 the name is not checked, and the authority only when one is given. A fingerprint suits a certificate signed by no authority. mysql_get_tls gives the version and cipher in use.
hostname = db.example.com
username = game
password = ${MYSQL_PASSWORD}
database = game
ssl_verify = true
ssl_ca_file = ca.pemmysql 0.6.0 · Repository · Releases · MIT License
Guides
- Installation
- Configuration
- Queries
- The cache
- JSON cells
- Prepared statements
- Transactions
- The ORM
- Passwords
- Errors
- TLS
- Coming from another plugin
- Performance
Reference
Functions
Connections
Queries
Cache
- cache_get_row_count
- cache_get_field_count
- cache_get_result_count
- cache_get_field_name
- cache_get_field_type
- cache_get_field_index
- cache_set_result
- cache_get_value_index
- cache_get_value_index_int
- cache_get_value_index_float
- cache_get_value_index_bool
- cache_is_value_index_null
- cache_get_value_name
- cache_get_value_name_int
- cache_get_value_name_float
- cache_get_value_name_bool
- cache_is_value_name_null
- cache_get_row
- cache_save
- cache_delete
- cache_set_active
- cache_unset_active
- cache_is_any_active
- cache_is_valid
- cache_affected_rows
- cache_insert_id
- cache_warning_count
- cache_get_query_exec_time
- cache_get_query_string
- cache_get_errno