Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why would rows match but not be changed with a mysql update statement?

Tags:

mysql

I'm used to MSSQL, not Mysql, so sorry for this probably stupid question. I'm trying update my password for a backup database I'm getting setup by running the following query:

update users set password = md5('pass') where username = 'admin'

When I run this it says

Query OK, 0 rows affected (0.01 sec) Rows matched: 1 Changed: 0 Warnings: 0

Why is a row matching but not changing?

like image 812
KallDrexx Avatar asked Feb 20 '23 02:02

KallDrexx


1 Answers

It means that the value was not changed. It was probably not changed because the column was already equal to the md5 hash of pass.

like image 143
Corbin Avatar answered Feb 23 '23 01:02

Corbin