修改root账户密码为“root”后,提示ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

MySQL5.7 加强了安全保障,以上意思是密码不符合安全策略要求,我们输入一个8位或以上长度,复杂一点的密码

mysql> show databases;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

可以通过命令如下命令修改密码:

alter user 'root'@'localhost' identified by 'xiaxiaoxu';
mysql> alter user 'root'@'localhost' identified by 'xiaxiaoxu';
Query OK, 0 rows affected (0.00 sec)

之后再运行就不会有问题了

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)

MySQL root账户密码设为“root”后执行命令提示ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.的更多相关文章

  1. MySQL用户密码过期登陆报错ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

    今天接到主从复制失败告警,查看MySQL,发现MySQL能够登陆但是执行命令报错, ERROR 1820 (HY000): You must reset your password using ALT ...

  2. 【MySQL】ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing

    今天上午遇到了一个问题,新创建的mysql5.7的数据库,由于初始化有点问题,没有给root密码,用了免密码登录. 但是,修改了root密码之后,把配置中的免密登录的配置注释掉后,重启服务.服务正常启 ...

  3. 第一次登录mysql,使用任何命令都报错ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

    问题: 使用临时密码登录成功后,使用任何myql命令,例如show databases;都提示下面的报错 ERROR 1820 (HY000): You must reset your passwor ...

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

    解决方法: 修改密码:alter user 'root'@'localhost' identified by '123456'; mysql> use mysql; ERROR 1820 (HY ...

  5. MySQL数据库使用报错ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

    今天MySQL数据库,在使用的过程中一直报错ERROR 1820 (HY000): You must reset your password using ALTER USER statement be ...

  6. tar格式 方法安装MySQL后,初次登录出现 ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement

    参考: https://www.cnblogs.com/kerrycode/p/4368312.html http://blog.csdn.net/u014520039/article/details ...

  7. mysql 报错ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executin

    解决办法1. 修改用户密码mysql> alter user 'root'@'localhost' identified by 'youpassword'; 或者 mysql> set p ...

  8. Mysq登陆后执行命令提示You must SET PASSWORD before executing this statement

    mysql  安装完成后,在输入命令行时,提示:You must SET PASSWORD before executing this statement 提示必须设置密码,我想不是已经设置了密码吗? ...

  9. linux 系统下MySQL5.7重置root密码(完整版,含ERROR 1820 (HY000)解决方案)

    mysql的root密码忘记了怎么重置? 往下看: 1.保证你的mysql服务处于关闭状态.(用ps -ef | grep mysql 查看进程,有则kill -9 进程号) 2.在my.cnf所在目 ...

随机推荐

  1. nginx socket转发设置

    1.添加依赖模块,如下 --with-stream --with-stream_ssl_module 2.nginx.conf 配置,参考说明:ngx_stream_core_module user ...

  2. Thinkphp---自定义服务类!

    考虑到有些功能是复用的,可以将一些复用的功能放到一个服务里面公用! 例如:公共模块新建一个服务类: 示例: <?php namespace Common\Service; // use Thin ...

  3. Java与JS判断请求来是否来自移动端

    Java public boolean JudgeIsMoblie(HttpServletRequest request) { boolean isMoblie = false; //String[] ...

  4. POJ 1984 - Navigation Nightmare - [带权并查集]

    题目链接:http://poj.org/problem?id=1984 Time Limit: 2000MS Memory Limit: 30000K Case Time Limit: 1000MS ...

  5. 各种小巧的Hello World

    在Reddit看到这篇文章:Hello from a libc-free world! ,觉得挺有趣,然后又想起以前看过的各种相关资料,在此做一个整理.注意所有实验环境都为Linux. 版本一: 实际 ...

  6. Cocoa 集合类型:NSPointerArray,NSMapTable,NSHashTable

    iOS 中有很多种集合类型,最为常见的可能就 NSArray.NSDictionary.NSSet,但其实还有 NSPointerArray.NSMapTable.NSHashTable 等类型,虽然 ...

  7. arcpy调试

    arcpy调试过程中, 在代码中加入一些输出语句来判断代码运行流程, 使用  arcpy.AddMessage(“”)    而不要使用 print    如下两图所示,print并未输出~~

  8. 2018/04/03 每日一个Linux命令 之 lastb/last

    今天还在想暴力破解一个服务器是怎么完成的....... -- lastb功能说明:列出登录系统失败的用户相关信息. -- 单独执行 lastb 时候,它会读取/var/log 下的 btmp 文件,输 ...

  9. js判断字符串长度

    方法1: String.prototype.gblen = function() { var len = 0; for (var i=0; i<this.length; i++) { if (t ...

  10. http_build_query

    http_build_query (PHP 5) http_build_query -- 生成 url-encoded 之后的请求字符串描述string http_build_query ( arra ...