我在更新mysql的密码时,总是出现语法错误。
mysql> UPDATE user SETPassword=PASSWORD(123456) where USER='root';
报错
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=PASSWORD(123456) where USER='root'' at line 1
或使用
mysql> update user set password=PASSWORD("123456") where user='root';
也报语法错误
ERROR 1054 (42S22): Unknown column 'password' in 'field list'