zoukankan      html  css  js  c++  java
  • 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)
  • 相关阅读:
    初识Java8新特性Lambda(二) 之collections
    hadoop-2.5.0-cdh5.3.6 native包 替换
    初识Java8新特性Lambda(三 ) 之lambda类库Stream
    初识Java8新特性Lambda(一)
    js将文件流转为文件
    验证有效的外部链接
    gb2312编码转换
    Beautiful Soup4
    chromedriver版本下载
    redmine使用post登录,cookie使用
  • 原文地址:https://www.cnblogs.com/sharesdk/p/10066413.html
Copyright © 2011-2022 走看看