• ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.


    MySQL 首次安装后,执行命令提示:

    1 3306 [(none)]>show databases;
    2 ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

    解决办法

    1 #ALTER USER 'root'@'localhost' IDENTIFIED BY '123' PASSWORD EXPIRE NEVER;
    2 #flush privileges;
     1 3306 [(none)]>ALTER USER 'root'@'localhost' IDENTIFIED BY '123' PASSWORD EXPIRE NEVER;
     2 Query OK, 0 rows affected (0.01 sec)
     3 
     4 3306 [(none)]>flush privileges;
     5 Query OK, 0 rows affected (0.00 sec)
     6 
     7 3306 [(none)]>show databases;
     8 +--------------------+
     9 | Database           |
    10 +--------------------+
    11 | information_schema |
    12 | mysql              |
    13 | performance_schema |
    14 | sys                |
    15 +--------------------+
    16 4 rows in set (0.01 sec)
  • 相关阅读:
    【脑图】iOS的Crash分类和捕获
    Ruby03
    Ruby02
    Ruby01
    如何快速把一个十进制数转换为二进制?
    iOS
    互联网协议基本知识
    XCBB
    iOS
    iOS
  • 原文地址:https://www.cnblogs.com/crossworld/p/11557229.html
Copyright © 2020-2023  润新知