问题:

使用临时密码登录成功后,使用任何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. 关于lampp中的proftpd的一些使用

    这个是配置文件 ServerName "ProFTPD" ServerType standalone DefaultServer on Port 21 这个是端口 Umask Ma ...

  2. Maven私服安装

    下载安装包:nexus(https://www.sonatype.com/download-oss-sonatype) 默认用户密码字符串: adminAdministratorUseractive& ...

  3. web 在线聊天的基本实现

    参考:https://www.cnblogs.com/guoke-jsp/p/6047496.html

  4. MVC登录校验

    利用MVC自带的过滤器可现实简单的登录校验 在项目目录下创建一个BaseController控制器,让需要验证的控制器继承这个BaseController 需要让BaseController继承Con ...

  5. NRF51822之FICR

    uint32_t deviceID[2];union{    uint32_t  DW;    uint8_t   B[4];} device_ID;//read device ID deviceID ...

  6. PhotoShop阵列功能

    阵列有两种,如下.但是PS没有阵列这一工具,一定要用ps的话,可以参照以下两条: 1:方形阵列 先按CTRL+ALT+T 会出现一个自由变换选取 但是这个是多重复制的选取只要一动就能复制了 确定 然后 ...

  7. Xshell 公钥登入服务器

    1:生成公钥 此时有test.pub文件 2:linux CentOS 7 配置 2.1 test.pub 存入/root/test.pub目录下面 2.2 确保authorized_keys文件内容 ...

  8. jquery 属性-记住

    $("").attr(); $("").removeAttr(); $("").prop(); $("").remove ...

  9. mysql每天凌晨0点准时启动taskeng.exe如何关闭

    MySQL弹出一个taskeng.exe. 内容如下:=====================Start Initialization====================mysql Instal ...

  10. 初识AutoMapper

    在开始本篇文章之前,先来思考一个问题:一个项目分多层架构,如显示层.业务逻辑层.服务层.数据访问层.层与层访问需要数据载体,也就是类.如果多层通用一个类,一则会暴露出每层的字段,二者会使类字段很多,而 ...