UPDATE NO MYSQL [duplicate]

0

I have an encrypted field in the MYSQL database. I'm trying to update this way

UPDATE USUARIOS
SET SENHA = md5(1234)
WHERE ID = 216;

but gives me this error message:

  

Error Code: 1406. Data too long for column 'PASSWORD' at rom 1

    
asked by anonymous 21.08.2018 / 22:05

1 answer

0

Without the table creation script there is no way to know how many characters the "password" column supports, but the error indicates that the value being assigned to the field has a larger amount of characters than it accepts. It gives a check on how many characters your hash is generating, and if so, increase the number of characters in the field so it can store the returned value.

    
21.08.2018 / 22:10