Maximum MySQL user password length

前端 未结 1 601
清酒与你
清酒与你 2021-02-06 22:58

What is the maximum length for a MySQL user password?

MySQL uses PASSWORD(str) to encrypt the cleartext password str. This hashed password string is stored

1条回答
  •  北荒
    北荒 (楼主)
    2021-02-06 23:19

    This is the reference pages I found when I googled : Link1 and Link2

    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.)

    Fix documented in the 5.7.5 changelog, as follows:

    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.

    So I would safely assume my password should not be more than 32 characters.

    0 讨论(0)
提交回复
热议问题