zoukankan      html  css  js  c++  java
  • MySQL5.7关于密码二三事

    MySQL5.7关于密码二三事

    第一个:update user set password=password('root') where user='root' and host='localhost';语句无用

    在5.7的user表中没有了password这个列名,改为了authentication_string,所以修改用户登入的密码语句为

    update user set authentication_string=password('root') where user='root' and host='localhost';

    第二个: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 before executing this statement.

    原因:MySQL5.7对于密码安全的要求限制,所以你要修改root密码,要不设置符合它要求的密码,或者修改其默认配置

    下面是修改它默认配置的方法

    首先,修改validate_password_policy参数的值

    mysql> set global validate_password_policy=0;

    Query OK, 0 rows affected (0.00 sec)

    validate_password_length(密码长度)参数默认为8,我们修改为1

    mysql> set global validate_password_length=1;

    Query OK, 0 rows affected (0.00 sec)

    完成之后再次执行修改密码语句即可成功

    mysql> alter user 'root'@'localhost' identified by 'root';

    Query OK, 0 rows affected (0.00 sec)

    神坑的事情,修改密码的时候不提醒我,进入操作以后再说,我都登录进来了,这样密码,还有什么安全性??

  • 相关阅读:
    稠密光流
    分水岭分割
    Haar小波分析
    内积空间
    矩阵LU分解
    opencv笔记---contours
    Deformable Templates For Eye Detection
    最小二乘法
    字符集及编码
    层次聚类
  • 原文地址:https://www.cnblogs.com/hahayixiao/p/10429415.html
Copyright © 2011-2022 走看看