MySQL报错:ERROR 1054 (42S22): Unknown column ‘‘root’‘ in ‘where clause‘
前言:在修改MySQL数据库密码的时候报错ERROR 1054 (42S22): Unknown column ‘‘root’’ in ‘where clause’首先分析update语句存在的错误:1、使用的是MySQL8.0,所以使用的是authentication_string,而不是password。2、属性的字段值需要使用单引号(’’),或者双引号("")包裹。update user s
文章共155字 · 阅读需要大约1分钟
一键AI生成摘要,助你高效阅读
问答
·
前言:在修改MySQL数据库密码的时候报错
ERROR 1054 (42S22): Unknown column ‘‘root’’ in ‘where clause’
首先分析update语句存在的错误:
- 1、使用的是MySQL8.0,所以使用的是authentication_string,而不是password。
- 2、属性的字段值需要使用单引号(’’),或者双引号("")包裹。
update user set authentication_string=’’ where user = ‘root’;
修改后的SQL语句:
update user set authentication_string="" where user = "root";
更多推荐
已为社区贡献7条内容
所有评论(0)