Common SQL Errors

MySQL Error 3160: ER_NO_SECURE_TRANSPORTS_CONFIGURED - How to Fix and Prevent

Galaxy Team
August 8, 2025

MySQL raises error 3160 when require_secure_transport is set to ON but neither SSL nor shared memory transport is available.

Sign up for the latest in common SQL errors from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

What is MySQL error 3160 (ER_NO_SECURE_TRANSPORTS_CONFIGURED)?

ER_NO_SECURE_TRANSPORTS_CONFIGURED (MySQL error 3160) appears when require_secure_transport is enabled on a server without SSL keys or shared memory. Install valid SSL certificates or enable shared_memory, then restart MySQL, to clear the error.

Error Highlights

Typical Error Message

ER_NO_SECURE_TRANSPORTS_CONFIGURED

Error Type

Configuration Error

Language

MySQL

Symbol

configured, unable to set --require_secure_transport=ON. The require_secure_transport system variable cannot be enabled if the server does not support at least one secure transport. Configure the server with the required SSL keys/certificates to enable SSL connections, or enable the shared_memory system variable to enable shared-memory connections. ER_NO_SECURE_TRANSPORTS_CONFIGURED was added in 5.7.8.

Error Code

3160

SQL State

HY000

Explanation

Table of Contents

What is MySQL Error 3160 (ER_NO_SECURE_TRANSPORTS_CONFIGURED)?

MySQL error 3160 signals that the global require_secure_transport variable was set to ON, but the server is not listening on any secure transport. Secure transports in MySQL are SSL/TLS connections or Windows shared memory.

When require_secure_transport is ON, every client must connect either through SSL or shared memory. If neither option is available the server refuses to start, and the error appears during startup or when you attempt to turn the variable on dynamically.

What Causes This Error?

The error stems from a mismatch between server configuration and security requirements. MySQL checks for at least one secure transport before allowing require_secure_transport to be enabled.

Typical triggers include missing or unreadable SSL certificate files, skip_ssl compilation, using a non-Windows build without shared memory, or forgetting to grant the SHARED_MEMORY privilege on Windows.

How to Fix ER_NO_SECURE_TRANSPORTS_CONFIGURED

The fix is to configure at least one secure transport and then enable the variable. In production environments, configuring SSL is the preferred approach because it works cross-platform and over networks.

Alternatively, on Windows you can enable shared_memory connections by setting shared_memory to ON and allowing clients to connect through the MySQL shared memory protocol.

Common Scenarios and Solutions

On Linux servers lacking SSL keys, generate a self-signed certificate with the mysql_ssl_rsa_setup utility, add the key and certificate paths to my.cnf, restart, and then set require_secure_transport=ON.

On managed cloud services, use the cloud provider's SSL auto-management feature, confirm have_ssl=YES, and then toggle the variable.

Best Practices to Avoid This Error

Ship servers with SSL correctly configured in configuration management. Add a startup test that checks SHOW VARIABLES LIKE "have_ssl" and shared_memory before toggling require_secure_transport.

Store certificates in secure directories, rotate them automatically, and monitor log files for SSL-related warnings that could disable the transport.

Related Errors and Solutions

ER_SSL_CONNECTION_ERROR occurs when SSL negotiation fails even though SSL is enabled. ER_SHARED_MEMORY_CONNECT_ABANDONED occurs when a client drops during shared memory negotiation. Both errors are resolved by validating certificates or shared memory settings.

Common Causes

Missing SSL certificates

my.cnf points to key files that do not exist or are unreadable so MySQL disables SSL at startup.

have_ssl=DISABLED

The server was compiled without OpenSSL or SSL support was disabled with the skip_ssl option.

Shared memory disabled

On Windows shared_memory is OFF so no secure local transport is present.

Wrong certificate permissions

Filesystem permissions prevent mysqld from reading the certificates, resulting in SSL not being available.

Related Errors

ER_SSL_CONNECTION_ERROR

Connection attempt fails during SSL negotiation because of certificate mismatch.

ER_ALLOW_PK_IN_NOT_NULL_TABLE

Primary key creation fails when a column is NOT NULL but a default value is missing.

ER_SSL_CIPHER_ERROR

Server and client share no common cipher when attempting SSL connection.

FAQs

Can I enable require_secure_transport without SSL?

Yes, but only on Windows by enabling shared_memory transport. Otherwise at least one SSL transport is mandatory.

Does MySQL restart automatically fix error 3160?

Restart alone will not help unless you fix the underlying SSL or shared memory configuration first.

How do I test if SSL is working?

Run SHOW STATUS LIKE "Ssl_cipher" from a client connection. A non-empty value confirms SSL is in use.

How can Galaxy help?

Galaxy highlights connection errors instantly in the editor output and lets you share the fixed configuration snippet with your team to prevent recurring issues.

Start Querying with the Modern SQL Editor Today!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Check out some other errors

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo