gpt4 book ai didi

mysql - MySQL 用户密码最大长度

转载 作者:IT老高 更新时间:2023-10-28 23:44:43 29 4
gpt4 key购买 nike

MySQL 用户密码的最大长度是多少?

MySQL 使用 PASSWORD(str)加密明文密码str。此散列密码字符串以 CHAR(41) 数据类型存储在 mysql.user 授权表中。

但是,我找不到明文密码 str 的最大长度(如果有的话)。有人可以帮忙吗?

最佳答案

这是我在谷歌上找到的引用页面: Link1Link2

If you are using MySQL Replication, be aware that, currently, a password used by a replication slave as part of a CHANGE MASTER TO statement is effectively limited to 32 characters in length; if the password is longer, any excess characters are truncated. This is not due to any limit imposed by the MySQL Server generally, but rather is an issue specific to MySQL Replication. (For more information, see Bug 43439.)

修复记录在 5.7.5 changelog 中,如下:

The maximum length that can be used for the password in a CHANGE MASTER TO statement is 32 characters. Previously, when a longer password was employed, any excess length was silently truncated by the server. Now when the password's length exceeds 32 characters, CHANGE MASTER TO fails with an error.

所以我可以安全地假设我的密码不应超过 32 个字符。

关于mysql - MySQL 用户密码最大长度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7465204/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com