X 插件支持使用 caching_sha2_password 认证插件创建的 MySQL 用户账户。有关此插件的更多信息,请参阅 第 8.4.1.2 节,“缓存 SHA-2 可插拔认证”。您可以使用 X 插件通过非 SSL 连接使用 SHA256_MEMORY 认证,以及通过 SSL 连接使用 PLAIN 认证对这些账户进行认证。X Plugin supports MySQL user accounts created with the
caching_sha2_password authentication plugin.
For more information on this plugin, see
Section 8.4.1.2, “Caching SHA-2 Pluggable Authentication”. You can
use X Plugin to authenticate against such accounts using non-SSL
connections with SHA256_MEMORY authentication
and SSL connections with PLAIN authentication.
虽然 caching_sha2_password 身份验证插件拥有身份验证缓存,但此缓存不会与 X 插件共享,因此 X 插件使用自己的身份验证缓存进行 SHA256_MEMORY 身份验证。X 插件身份验证缓存存储用户帐户密码的哈希,并且不能通过 SQL 访问。如果用户帐户被修改或删除,相关条目会从缓存中删除。X 插件身份验证缓存由 mysqlx_cache_cleaner 插件维护,该插件默认启用,并且没有相关的系统变量或状态变量。Although the caching_sha2_password
authentication plugin holds an authentication cache, this cache is
not shared with X Plugin, so X Plugin uses its own
authentication cache for SHA256_MEMORY
authentication. The X Plugin authentication cache stores hashes
of user account passwords, and cannot be accessed using SQL. If a
user account is modified or removed, the relevant entries are
removed from the cache. The X Plugin authentication cache is
maintained by the mysqlx_cache_cleaner plugin,
which is enabled by default, and has no related system variables
or status variables.
在使用非 SSL 的 X 协议连接来验证使用 caching_sha2_password 验证插件的账户之前,该账户必须至少通过带有 SSL 的 X 协议连接进行过一次身份验证,以将密码提供给 X 插件验证缓存。一旦通过 SSL 的初始身份验证成功,就可以使用非 SSL 的 X 协议连接。Before you can use non-SSL X Protocol connections to authenticate
an account that uses the caching_sha2_password
authentication plugin, the account must have authenticated at
least once over an X Protocol connection with SSL, to supply the
password to the X Plugin authentication cache. Once this initial
authentication over SSL has succeeded, non-SSL X Protocol
connections can be used.
可以通过使用选项 --mysqlx_cache_cleaner=0 启动 MySQL 服务器来禁用 mysqlx_cache_cleaner 插件。如果这样做,X 插件验证缓存将被禁用,因此在使用 SHA256_MEMORY 验证进行 X 协议连接时必须始终使用 SSL。It is possible to disable the
mysqlx_cache_cleaner plugin by starting the
MySQL server with the option
--mysqlx_cache_cleaner=0. If you do this, the
X Plugin authentication cache is disabled, and therefore SSL must
always be used for X Protocol connections when authenticating
with SHA256_MEMORY authentication.