Configure MySQL TLS in three layers: install a trusted CA, server certificate, and private key; point mysqld at those PEM files; then require and verify encrypted connections from clients. For a server-wide policy, set require_secure_transport=ON. For stronger client verification, use --ssl-mode=VERIFY_CA or VERIFY_IDENTITY instead of merely requesting encryption.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
The procedure below covers certificate preparation, Linux file permissions, account-level policies, safe reloads, client commands, TLS-version choices, and verification. It applies to MySQL installations that support the documented TLS system variables and client options.
As an Amazon Associate I earn from qualifying purchases.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →What MySQL TLS protects—and what it does not
TLS encrypts the MySQL protocol between a client and server and lets the client authenticate the server certificate. It protects credentials and query results while they cross an untrusted network. TLS does not replace MySQL account passwords, authorization, firewall rules, backups, or operating-system access controls.
There are two separate decisions. First, decide whether a connection must be encrypted. Second, decide how strongly the client must validate the server identity.
#1 Best Overall
- BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
- EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
- COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
- LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
- WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
| Setting or mode | Purpose | What it does not guarantee |
|---|---|---|
require_secure_transport=ON |
Rejects nonsecure TCP connections globally. | It does not make every client validate the certificate identity. |
REQUIRE SSL |
Requires encryption for one MySQL account and host pattern. | It does not require a client certificate. |
--ssl-mode=REQUIRED |
Fails the client connection if an encrypted session cannot be established. | It does not validate the issuing CA or hostname. |
--ssl-mode=VERIFY_CA |
Requires TLS and validates the server certificate chain against the supplied CA. | It does not check that the certificate name matches the hostname. |
--ssl-mode=VERIFY_IDENTITY |
Validates the CA chain and checks the server name against the certificate identity. | It requires a hostname that is actually covered by the certificate. |
REQUIRE X509 |
Requires TLS plus a client certificate and private key, enabling mutual certificate authentication. | It does not by itself define which CA or hostname a client should use; client and server certificate trust must be configured correctly. |
Unix-socket connections are treated as secure transport under MySQL’s documented behavior. Consequently, require_secure_transport=ON blocks insecure TCP attempts but does not prohibit a local process that connects through the server’s Unix socket.
Decide the deployment policy before installing certificates
Write down the intended scope and trust model before changing a production instance. This avoids accidentally enforcing a policy that existing applications cannot satisfy.
Recommended Free Tools
Global versus account-level enforcement
- Use
require_secure_transport=ONwhen every TCP client should use encryption and you can test all applications together. - Use
ALTER USER ... REQUIRE SSLfor a staged rollout, legacy exceptions, or a limited set of application accounts. - Use
REQUIRE X509only when you are prepared to issue, distribute, rotate, and revoke client certificates as well as server certificates.
Server-only TLS versus mutual X.509
Most deployments need server-authenticated TLS: the client proves the server is the intended endpoint, then continues to authenticate with its normal MySQL credentials. Mutual X.509 adds a client certificate requirement and is useful when possession of an approved certificate must be part of account authentication. It also adds certificate lifecycle work for every client.
Choose a certificate lifecycle
| Approach | Advantages | Operational concern |
|---|---|---|
| MySQL-assisted generation | Quickly creates the files needed for a test or controlled internal deployment. | Self-managed trust and renewal remain your responsibility; externally managed certificates are preferable where a controlled public-key lifecycle is required. |
| Externally managed CA and certificates | Lets your organization control issuance, naming, validity, renewal, and distribution. | You must install matching PEM files and keep their permissions and renewal process correct. |
Prepare the CA, server certificate, and private key
MySQL needs three PEM-encoded objects:
- CA certificate: the trust anchor used by clients to validate the server certificate.
- Server certificate: the public certificate presented by
mysqld. Its identity must include every hostname clients will pass toVERIFY_IDENTITY. - Server private key: the secret key corresponding to the server certificate.
Obtain or generate these with MySQL’s supported certificate-generation procedure or with an OpenSSL-based CA process. Do not copy a private key into application repositories, world-readable backup locations, or user home directories. Keep the CA certificate available to clients that will perform verification; the private key belongs only on the server.
Use names that match real client connections
Hostname verification compares the name supplied by the client with the certificate identity. If applications connect as db-prod.example.net, that name must be covered by the certificate. A certificate for an IP address, short hostname, or unrelated alias will fail VERIFY_IDENTITY even though the same certificate may work with the weaker VERIFY_CA mode.
Create a dedicated Linux directory
sudo install -d -m 750 -o mysql -g mysql /etc/mysql/tls
Place the CA certificate, server certificate, and private key in that directory. The exact service account and group can differ by distribution, so use the account that runs your MySQL service. Restrict the private key more tightly than the public certificates:
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #2
- WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
- AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
- PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
- ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
- COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
sudo chown mysql:mysql /etc/mysql/tls/server-key.pem
sudo chmod 600 /etc/mysql/tls/server-key.pem
sudo chmod 644 /etc/mysql/tls/ca.pem /etc/mysql/tls/server-cert.pem
If administrators need to inspect the files without changing ownership, grant access through an appropriate administrative group rather than making the key world-readable.
Configure the MySQL server
Edit the active my.cnf file or an included server configuration snippet. Put these variables in the [mysqld] section and use the actual paths on your host:
[mysqld]
ssl_ca=/etc/mysql/tls/ca.pem
ssl_cert=/etc/mysql/tls/server-cert.pem
ssl_key=/etc/mysql/tls/server-key.pem
ssl_ca identifies the trust anchor, ssl_cert identifies the public server certificate, and ssl_key identifies its private key. A typo, unreadable file, wrong format, or certificate-key mismatch prevents MySQL from loading the intended TLS context.
Check the file ownership before applying the change
- The MySQL service account must be able to traverse
/etc/mysqland its TLS subdirectory. - The service account must be able to read the three configured files, especially the private key.
- Parent-directory permissions must not expose the private key to ordinary users.
- The certificate and key must be a matching pair, and the certificate must chain to the CA distributed to clients.
Optional protocol and cipher policy
MySQL 8.4 can use TLS 1.3 when the server was built against OpenSSL 1.1.1 or newer. You can constrain accepted protocols with tls_version and TLS 1.3 cipher suites with tls_ciphersuites, but do so only after checking every client library and connector in the deployment. A policy that excludes a protocol or cipher still required by an older client causes connection failures rather than a graceful fallback.
Enforce encrypted transport
Server-wide enforcement
Add this line to the [mysqld] section when all TCP clients must use TLS:
require_secure_transport=ON
With this enabled, MySQL rejects nonsecure TCP connection attempts. Local Unix-socket connections remain permitted under the documented secure-transport rule, so use operating-system controls as well if local processes must also be restricted.
Rank #3
- Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
- Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
- Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
- ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
- Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
Per-account enforcement
For a staged migration, alter selected accounts while leaving other accounts unchanged:
ALTER USER 'app'@'host' REQUIRE SSL;
Replace 'app'@'host' with the exact MySQL account definition, including its host component. This policy requires encryption but does not require the client to present a certificate.
For mutual certificate authentication, use:
ALTER USER 'app'@'host' REQUIRE X509;
An account with REQUIRE X509 needs a client certificate and corresponding private key in addition to the server-side TLS configuration. Plan certificate issuance and rotation before applying this requirement to an application account.
Roll out without locking out applications
- Inventory connection strings, libraries, scheduled jobs, replicas, administration tools, and health checks.
- Install the CA certificate on each client that will verify the server.
- Test one account with an explicit TLS mode and inspect the negotiated session.
- Apply
REQUIRE SSLorREQUIRE X509to selected accounts. - Monitor failed connection attempts and correct client configuration.
- Enable
require_secure_transport=ONonly after the remaining TCP clients have been tested.
Apply certificate changes safely
Restart MySQL after changing the configuration or certificate files, or use the documented ALTER INSTANCE RELOAD TLS workflow on versions that support it. Validate the replacement files before reloading. If validation fails, MySQL does not activate the replacement files; the previously active TLS context remains in place. Treat that behavior as protection against an accidental outage, not as evidence that the new certificate was installed successfully.
After a restart or reload, inspect the server’s active TLS settings rather than relying only on the file contents. Keep the old certificate and key available until the new context has been validated and clients have connected successfully, then remove retired secrets according to your organization’s key-retention policy.
Configure the MySQL client
Use an explicit SSL mode in scripts and connection profiles. The following commands illustrate the progression from encryption-only to full server identity validation.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #4
- Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
- Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
- 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
- Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
- USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
| Client command | Use when | Result |
|---|---|---|
mysql --host=db-prod.example.net --user=app -p --ssl-mode=REQUIRED |
You need to prevent plaintext fallback but are not yet validating a CA chain. | The connection fails if a secure session cannot be established. |
mysql --host=db-prod.example.net --user=app -p --ssl-mode=VERIFY_CA --ssl-ca=/path/to/ca.pem |
You want the client to trust only certificates chaining to your CA. | TLS is required and the certificate chain is validated; hostname identity is not checked. |
mysql --host=db-prod.example.net --user=app -p --ssl-mode=VERIFY_IDENTITY --ssl-ca=/path/to/ca.pem |
The hostname passed in --host is covered by the server certificate. |
TLS, the CA chain, and the server hostname identity are checked. |
mysql --host=db-prod.example.net --user=app -p --ssl-mode=VERIFY_IDENTITY --ssl-ca=/path/to/ca.pem --ssl-cert=/path/to/client-cert.pem --ssl-key=/path/to/client-key.pem |
The MySQL account uses REQUIRE X509. |
The client supplies its certificate and key as well as validating the server. |
REQUIRED is a transport requirement, not a trust decision. Prefer VERIFY_CA when the CA chain is the required assurance, and prefer VERIFY_IDENTITY when preventing connections to an impostor endpoint is part of the threat model.
Distribute the CA certificate correctly
Every client using VERIFY_CA or VERIFY_IDENTITY needs the issuing CA certificate at the path supplied with --ssl-ca, or in a configured CA directory. Distribute the CA certificate through your normal configuration-management process. Do not distribute the server private key to clients; clients need their own private key only when mutual X.509 authentication is required.
Use a CA directory or restrict protocol versions
CA directories
If you configure ssl_capath instead of one CA file, prepare the directory for OpenSSL’s hashed lookup format on Linux:
openssl rehash /path/to/ca-directory
Run the command after adding or replacing CA certificates. Without the generated hash links, MySQL may not find a CA that is present in the directory.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallTLS versions and ciphers
Before setting tls_version or tls_ciphersuites, list the client connectors and their OpenSSL or other TLS-library capabilities. TLS 1.3 is available on a MySQL 8.4 server built with OpenSSL 1.1.1 or newer, but clients must also support a protocol and cipher combination allowed by the server. Change one policy at a time and retain a tested rollback configuration.
Verify that encryption and certificate validation are actually working
- Connect with an enforced mode. Use
REQUIRED,VERIFY_CA, orVERIFY_IDENTITY; do not test with a client that is allowed to fall back to plaintext. - Check the client connection status. In the interactive client, run
STATUS;(or use the client’s connection-status command) and inspect the TLS state and negotiated cipher. A secure session should show an active SSL/TLS protocol and cipher rather than an empty SSL field. - Inspect server TLS variables. Review the active CA, certificate, key, protocol, and cipher values through MySQL’s corresponding status and system-variable views, for example:
SHOW VARIABLES LIKE 'ssl%';
SHOW VARIABLES LIKE 'tls%';
SHOW STATUS LIKE 'Ssl%';
- Test a negative case. Attempt a connection with
--ssl-mode=DISABLEDor another explicitly non-TLS setting from a test client. It should fail when the account or server policy requires secure transport. - Test identity validation separately. Use
VERIFY_IDENTITYwith the production hostname, then repeat with an alias not present in the certificate. The first should succeed and the second should fail; this confirms that hostname checking is doing work beyond CA validation. - Test the application path. A successful command-line connection does not prove that a pooled connection, replica client, migration job, or health check uses the same TLS options. Verify each connection path independently.
Troubleshoot common failures
“SSL connection error” immediately after startup
Check the MySQL error log for an unreadable file, invalid PEM encoding, expired certificate, or certificate-key mismatch. Confirm that the configured paths are in the active [mysqld] section and that the service account can read them. Correct the files, then restart or reload TLS and inspect the active variables again.
Best Value
- Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
- Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
- Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
- Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
- Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
VERIFY_CA fails with an unknown CA
The client either lacks the issuing CA certificate or is using the wrong path. Install the CA certificate on that client and pass the corrected --ssl-ca path. If you use ssl_capath, rerun openssl rehash after changing the directory.
VERIFY_IDENTITY fails but VERIFY_CA succeeds
The certificate chain is trusted, but the hostname supplied to --host is not covered by the certificate identity. Connect with a covered DNS name or issue a replacement certificate containing the required hostname. Do not weaken production clients to VERIFY_CA merely to hide a naming error when endpoint identity matters.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →An account using REQUIRE X509 is rejected
Confirm that the client command includes both --ssl-cert and --ssl-key, that the files form a matching pair, and that the client certificate chains to a CA trusted by the server’s account policy. An encrypted connection without a client certificate does not satisfy REQUIRE X509.
Applications fail after enabling require_secure_transport
Look for clients that connect over TCP without an SSL mode, old connectors that cannot negotiate the allowed protocol, and local tools that use a different connection method than expected. Add explicit TLS settings to each client, verify compatibility with the configured protocol and cipher policy, or temporarily use account-level enforcement while the remaining clients are migrated.
A reload appears successful but the new certificate is not active
Read the server’s active TLS variables and error log. MySQL keeps the previous active context when replacement-file validation fails. Fix the replacement files and repeat the validated reload; do not assume that copying a file changed the running server.
Quick Recap
Operational checklist
- CA, server certificate, and private key are PEM encoded and form a valid chain.
- The certificate identity covers every hostname used with
VERIFY_IDENTITY. - The MySQL service account can read the files, while ordinary users cannot read the private key.
- Clients that verify certificates have the correct CA certificate.
- Every client uses an explicit SSL mode; production clients do not rely on fallback behavior.
- Account policies are correct:
REQUIRE SSLfor encryption-only accounts andREQUIRE X509for mutual certificate authentication. - Any CA directory has been processed with
openssl rehash. - TLS-version and cipher restrictions have been tested against every connector, including administrative and background jobs.
- Client status and MySQL status variables show the expected protocol, cipher, CA, certificate, and key context.
- A controlled negative test proves that a nonsecure or incorrectly identified connection is rejected.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problems




