How to create a six character password in MySQL 5.7

后端 未结 7 794
星月不相逢
星月不相逢 2021-01-31 11:05

I need to create a user with a six character password in new MySQL on my mac. I know that the lowest setting in 5.7 will allows only eight characters. Is there any way to go aro

7条回答
  •  一生所求
    2021-01-31 11:41

    I believe you can get round it by using a pre hashed password like this :-

    CREATE USER 'newsier'@'localhost' IDENTIFIED WITH mysql_native_password
           AS '*0D3CED9BEC10A777AEC23CCC353A8C08A633045E';
    

    But that does mean you need to hash special correctly before this will actually set a password that you can then use the plain text version of.

提交回复
热议问题