How to hash passwords in MySQL?

前端 未结 6 788
死守一世寂寞
死守一世寂寞 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:03

    Concerning you edit: do you have an ID or username that identifies this row?

    UPDATE mytable
    SET password = MD5(password)
    WHERE id <> 123
    

提交回复
热议问题