Skip to content

[Proposal]: Return a clearer error when account SSL requirements are not met #99

Description

@Taeknology

Proposal

MySQL should distinguish an invalid password from a connection rejected specifically because the account's SSL requirements are not satisfied.

Currently, both cases can return:

ERROR 1045 (28000): Access denied for user ... (using password: YES)

using password: YES only indicates that the client supplied a password. It does not mean that the password was incorrect.

Why this matters

I work as a DBA and am currently helping teams prepare for the MySQL 8.0 end-of-life transition. During this work, I repeatedly receive connection-failure inquiries where developers assume that Access denied ... (using password: YES) means the password is incorrect.

In many cases, investigating the password is only the beginning. The actual cause may involve SSL requirements, authentication plugins, TLS configuration, or connector compatibility. Because these failures can appear identical to clients, application developers and DBAs must repeatedly inspect secrets, account definitions, connector settings, and server-side diagnostics to determine the real cause.

As authentication and transport requirements become more diverse in newer MySQL versions, this ambiguity creates growing operational and support overhead.

A clearer client-visible error would allow developers to investigate the correct configuration immediately, reducing unnecessary password rotations, repeated support requests, and time-consuming coordination between application teams and DBAs.

Requested behavior

Keep the existing generic access-denied response for incorrect credentials and unknown accounts.

When a connection is rejected specifically because the account's SSL requirements are not satisfied, return a distinct and actionable error, for example:

Account SSL requirements were not satisfied.

The failure should have a stable error code so clients and connectors can identify it without parsing message text.

Security considerations

Invalid credentials and unknown accounts should continue receiving the generic access-denied response.

The new error should identify only the broad SSL-policy failure. It should not expose certificate details, expected subjects or issuers, or other sensitive account configuration.

Implementation feasibility

MySQL already distinguishes credential, authentication-plugin, handshake, and SSL failures internally. SSL failures are also counted separately through Performance Schema.

The required failure category therefore already exists in the server. This proposal asks that the category be preserved in the client response instead of being converted to the generic 1045 error.

Expected benefits

  • Shorter connection-failure investigations
  • Fewer unnecessary password rotations or account changes
  • Clearer guidance for application and connector developers
  • Better alignment between client errors and MySQL's existing internal diagnostics
  • Stable error handling without message-text parsing

Related issue

MySQL Bug #112581 reported the same SSL-versus-password ambiguity but was closed because it did not include a reproducible SQL and CLI test case.

A minimal MySQL 9.7 reproduction can be provided with this proposal.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Developer / DBA ExperienceTools, workflows, and features that make developers’ and DBAs’ day-to-day work easier.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions