问题:

使用临时密码登录成功后,使用任何myql命令,例如show databases;都提示下面的报错
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
 
 
使用dmg安装MySQL,安装最后一步,会生成一个root的临时密码。如下图的g*+mLj5IJ4u
使用mysql -uroot -p 临时密码登录mysql成功。
 
 

解决方法:

设置一下密码即可:
SET PASSWORD = PASSWORD('123456');
 
 
 

第一次登录mysql,使用任何命令都报错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. MySQL5.7 报错 ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement

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

  3. mysql5.7初始化密码报错 ERROR 1820 (HY000): You must reset your password using ALTER USER statement before

    mysql初始化密码常见报错问题1,mysql5.6是密码为空直接进入数据库的,但是mysql5.7就需要初始密码 cat /var/log/mysqld.log | grep password1 2 ...

  4. mysql5.7初始化密码报错 ERROR 1820 (HY000): You must reset your password using ALTER USER statement

    mysql初始化密码常见报错问题 1,mysql5.6是密码为空直接进入数据库的,但是mysql5.7就需要初始密码 cat /var/log/mysqld.log | grep password 2 ...

  5. 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 ...

  6. 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 ...

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

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

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

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

  9. 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 ...

随机推荐

  1. python中的extend

    extend()拓展列表,批量写入 举个例子: 1 a = ["hello", "world", "dlrb"] 2 b = [1, 2, ...

  2. Python中续行符的注意事项

    转载自:https://blog.csdn.net/g_66_hero/article/details/78745608

  3. Mapper的.xml文件的delete的参数问题

    <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE mapper PUBLIC "-// ...

  4. linux常用工具及命令

    1.windows复制文件到linux可以使用工具winscp工具 2.建立软连接命令(将/software/run.log的文件指向/usr/local/logs/中): cd /usr/local ...

  5. vue 的父组件和子组件互相获取数据和方法

    父组件主动获取子组件的数据和方法 一.ref(但不能实时更新获取) 1.调用子组件的时候 定义一个ref <child ref="headerChild"></c ...

  6. 【版本发布】JAVA微服务开发框架,Jeecg-P3 1.0.0 重构版本发布

    1.项目介绍 Jeecg-P3是一个微服务框架,采用插件式模式开发:业务插件以JAR方式提供,松耦合可插拔支持独立部署,也可无缝集成Jeecg平台中,目前jeecg已经提供了在线聊天,我的邮箱等一系列 ...

  7. 【JEECG技术文档】JEECG在线聊天插件功能集成文档

    原文地址:http://jeecg.iteye.com/blog/2320670 JEECG在线聊天插件功能集成文档 前提: 采用jeecg_3.6.3版本以上(Maven工程) 插件项目: 在线聊天 ...

  8. Django-wed开发框架-练习题

    https://www.cnblogs.com/pandaboy1123/p/9894981.html 1.列举Http请求常见的请求方式 HTTP协议是Hyper Text Transfer Pro ...

  9. OC代码编译成c++代码 编译器命令

    xcrun -sdk iphoneos clang -arch x86_64 -rewrite-objc Person+Test.m clang -rewrite-objc -fobjc-arc -s ...

  10. World Cup 996B(排队模拟)

    题意:有n个通道,按顺序每一次站一个通道,直到所站的通道没有人 分析:模拟这个过程 #include<cstdio> int main() { ]; while(~scanf(" ...