• mysql 5.7 ERROR 1054(42S22) Unknown column 'password' in ‘field list’ 报错


     mysql 5.7  修改 密码 报错?

    ERROR 1054(42S22) Unknown column 'password' in ‘field list’
    原因:
    5.7 版本下的mysql数据库下已经没有password这个字段了,password字段改成了authentication_string

    Mysql 忘记密码;
    
    1、停止 mysql 
    # /etc/init.d/mysql stop
    
    2、跳过验证登陆进入
    # mysqld_safe --user=mysql --skip-grant-tables --skip-networking &

    执行之后 另开一个窗口;

    root@datanode3: ~# mysql -u root mysql
    
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Welcome to the MySQL monitor. Commands end with ; or g.
    Your MySQL connection id is 2
    Server version: 5.7.24 MySQL Community Server (GPL)
    
    Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
    
    mysql> UPDATE user SET Password=PASSWORD('123456') where USER='root';
    ERROR 1054 (42S22): Unknown column 'Password' in 'field list'

    # 直接更改报错 需要一个 更改设置密码的参数 authentication_string mysql
    > update mysql.user set authentication_string=password('123456') where user='root'; Query OK, 1 row affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 1 mysql> flush privileges; Query OK, 0 rows affected (0.00 sec)
  • 相关阅读:
    数据结构上机思考
    hdu1005,循环节
    网络赛总结
    icpc沈阳网络赛。cake cake!
    树的基础代码
    网络赛第一场
    欧拉函数
    欧拉函数
    多校第十场
    (环上)最大子段和
  • 原文地址:https://www.cnblogs.com/sharesdk/p/10066413.html
Copyright © 2020-2023  润新知