首页   >   代码编程   >   JAVA开发

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

在linux服务器上安装了mysql之后,首次执行sql时,会强制要求更改默认的初始密码:“ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.”。

详细提示信息如下:

[root@iZuf6ho556ymkgz5z68m95Z mysql]# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.17

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

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

这是mysql自身的安全机制,可以不用在意,直接修改一下密码即可。

alter user 'root'@'localhost' identified by 'test..';

QQ群Ⅰ: 686430774 (已满)

QQ群Ⅱ: 718410762 (已满)

QQ群Ⅲ: 638620451 (已满)

QQ群Ⅳ: 474195684 (已满)

QQ群Ⅴ: 463034360 (已满)

QQ群Ⅵ: 879266502 (已满)

QQ群Ⅶ: 627786015 (已满)

工作5分钟,吹逼2小时: 855525339 (娱乐消遣,广告狗勿进)

如果文章有帮到你,可以考虑请博主喝杯咖啡!

分享到:

欢迎分享本文,转载请注明出处!

作者:不忘初心

发布时间:2020-01-10

永久地址:https://www.jiweichengzhu.com/article/3ac3e7ee62cd495fac4189ee1ffbf226

评论