zoukankan      html  css  js  c++  java
  • mysql-1862、1820、java.sql.SQLException: Your password has expired. To log in you must change it using a client that supports expired passwords.

    之前一直运行的好好的,突然mysql就无法工作了。请求命令后报错误:ERROR 1820 (HY000): You must SET PASSWORD before executing this statement ,使用phpMyAdmin管理工具也无法登录,显示错误:#1862 无法登录 MySQL 服务器

    错误解决

    进入mysql的服务器中使用mysql指令进行登录及操作。

    1.登录mysql:mysql -uroot -proot

    (root是我的帐号及密码)

    2.尝试是否报1820错误,执行语句:mysql> select 1;

    (将会得到一个错误:ERROR 1820 (HY000): You must SET PASSWORD before executing this statement)

    3.设置新密码:mysql> set password=password(‘root');

    (由于我不需要更改密码,所以再次重置一下密码为root)

    4.再次尝试是否报1820错误,执行语句:mysql> select 1;

    (将得到如下返回数据,说明问题已经解决了!)

    1
    2
    3
    4
    5
    6
    7
    mysql> select 1;
    +—+
    | 1 |
    +—+
    | 1 |
    +—+
    1 row in set (0.00 sec)

    转自:http://www.jb51.net/article/99079.htm

  • 相关阅读:
    Docker _简单使用
    IDEA常见问题
    Linux安装JDK
    vitualbox网络设置链接
    MQ对比
    乐观锁和悲观所在数据库中的实现
    11.08 JS知识
    11.07知识整理
    11.06 知识整理
    本周知识整理
  • 原文地址:https://www.cnblogs.com/weiwang/p/6252475.html
Copyright © 2011-2022 走看看