为什么行匹配但不能用mysql update语句更改? [英] Why would rows match but not be changed with a mysql update statement?

查看:59
本文介绍了为什么行匹配但不能用mysql update语句更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经习惯了MSSQL,而不是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'

当我运行它时说

查询正常,受影响的0行(0.01秒) 匹配的行:1已更改:0警告:0

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

为什么行匹配但没有更改?

Why is a row matching but not changing?

推荐答案

这表示该值未更改.可能没有更改,因为该列已经等于pass的md5哈希值.

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.

这篇关于为什么行匹配但不能用mysql update语句更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆