前言:在修改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";
本文解决MySQL8.0中更新root用户密码时遇到的未知列错误。通过调整SQL语句,将password替换为authentication_string,并确保字符串正确使用引号包裹。
348

被折叠的 条评论
为什么被折叠?



