How to hash passwords in MySQL?

前端 未结 6 791
死守一世寂寞
死守一世寂寞 2020-12-25 08:18

How I will make every password in my user table encrypted(md5()) except one particular row using a single query?

6条回答
  •  自闭症患者
    2020-12-25 09:15

    I think it is a little bit more update

    SET PASSWORD FOR 'existinguser'@'localhost' = PASSWORD('newpass');
    

    or

    UPDATE user SET  password = PASSWORD('newpass');
    

    Hope this help

提交回复
热议问题