本站中文解释
secure_auth参数设置了MySQL安全认证的机制。它的取值为ON或OFF。默认值是ON。如果设置为ON,则MySQL会使用新的验证机制,可以更好地保护MySQL服务器免受不可信任的客户端及不受控制的加密算法破解密码。设置为OFF,则复原为旧的验证机制,无法保护服务器免受攻击。
Mysql参数变量及用途设置的步骤如下:
1、检查参数变量secure_auth是否存在: 在MySQL命令行客户端中,输入命令 show variables like ‘%secure_auth%’; 查看是否存在该变量;
2、设置参数变量secure_auth: 在MySQL命令行客户端中,输入命令 set global secure_auth=ON或set global secure_auth=OFF; 根据需要设置该变量的值;
3、查看参数变量secure_auth的值是否设置成功: 在MySQL命令行客户端中,输入命令 show variables like ‘%secure_auth%’; 查看变量secure_auth的值是否已经设置成功。
官方英文解释
secure_auth
Command-Line Format | --secure-auth[={OFF|ON}] |
---|---|
Deprecated | Yes |
System Variable | secure_auth |
Scope | Global |
Dynamic | Yes |
Type | Boolean |
Default Value | ON |
Valid Values | ON |
If this variable is enabled, the server blocks connections by
clients that attempt to use accounts that have passwords
stored in the old (pre-4.1) format. Enable this variable to
prevent all use of passwords employing the old format (and
hence insecure communication over the network).
This variable is deprecated; expect it to be removed in a
future release of MySQL. It is always enabled and attempting
to disable it produces an error.
Server startup fails with an error if this variable is enabled
and the privilege tables are in pre-4.1 format. See
Section 6.4.1.3, “Migrating Away from Pre-4.1 Password Hashing and the mysql_old_password
Plugin”.
Note
Passwords that use the pre-4.1 hashing method are less
secure than passwords that use the native password hashing
method and should be avoided. Pre-4.1 passwords are
deprecated and support for them is removed in MySQL 5.7.5.
For account upgrade instructions, see
Section 6.4.1.3, “Migrating Away from Pre-4.1 Password Hashing and the mysql_old_password
Plugin”.