MySQL Variables check_proxy_users 数据库 参数变量解释及正确配置使用
本站中文解释
check_proxy_users参数可以定义MySQL需要检查是否为MySQLProxy用户的登录请求,代理用户能够在远程客户机上创建连接到MySQL服务器。这个参数用于提高安全性,以防止恶意用户使用MySQLProxy访问MySQL服务器。
要设置这个参数,可以使用MySQL命令行客户端或编辑MySQL配置文件,并使用以下语句:
SET @@global.check_proxy_users = 1;
要确保变量被正确应用,请重新启动MySQL服务,以确保参数被更新。此外,您也可以更改MySQL配置文件中的 check_proxy_users 参数,以永久性地更改变量。
官方英文解释
check_proxy_users
Command-Line Format | --check-proxy-users[={OFF|ON}] |
---|---|
System Variable | check_proxy_users |
Scope | Global |
Dynamic | Yes |
Type | Boolean |
Default Value | OFF |
Some authentication plugins implement proxy user mapping for
themselves (for example, the PAM and Windows authentication
plugins). Other authentication plugins do not support proxy
users by default. Of these, some can request that the MySQL
server itself map proxy users according to granted proxy
privileges: mysql_native_password
,
sha256_password
.
If the check_proxy_users
system variable is enabled, the server performs proxy user
mapping for any authentication plugins that make such a
request. However, it may also be necessary to enable
plugin-specific system variables to take advantage of server
proxy user mapping support:
-
For the
mysql_native_password
plugin,
enable
mysql_native_password_proxy_users
. -
For the
sha256_password
plugin, enable
sha256_password_proxy_users
.
For information about user proxying, see
Section 6.2.14, “Proxy Users”.