MySQL Variables old 数据库 参数变量解释及正确配置使用

本站中文解释

_passwords

old_passwords是MySQL 5.5版本新增的一个参数变量,用来控制MySQL使用认证方式,该变量有三个可选值:

(1)0:MySQL使用4.1以上版本的新密码验证算法,该算法可以确保4.1以上版本的帐号密码不会在其他数据库系统中被明文恢复(存储在mysql.user表中的Password字段);

(2)1:MySQL使用3.23以上版本的密码验证算法,该算法可以在其他数据库系统中被明文恢复(存储在mysql.user表中的Password字段);

(3)2:MySQL使用3.23以下版本的旧密码验证算法,该算法可以在其他数据库系统中被明文恢复(存储在mysql.user表中的Password字段)。

通常而言,MySQL默认值都是old_passwords=0,尽可能使用最新的密码验证算法,以确保帐号密码安全。要更改old_passwords参数值,可以在my.cnf文件中设置该参数:

[mysqld]
old_passwords=1

官方英文解释

old

Command-Line Format --old[={OFF|ON}]
System Variable old
Scope Global
Dynamic No
Type Boolean
Default Value OFF

old is a compatibility
variable. It is disabled by default, but can be enabled at
startup to revert the server to behaviors present in older
versions.

When old is enabled, it
changes the default scope of index hints to that used prior to
MySQL 5.1.17. That is, index hints with no
FOR clause apply only to how indexes are
used for row retrieval and not to resolution of ORDER
BY
or GROUP BY clauses. (See
Section 8.9.4, “Index Hints”.) Take care about enabling this
in a replication setup. With statement-based binary logging,
having different modes for the source and replicas might lead
to replication errors.


数据运维技术 » MySQL Variables old 数据库 参数变量解释及正确配置使用