mysql 修改密码提示ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

为什么会出现ERROR 1819 (HY000): Your password does not satisfy the current policy requirements 这个错误。

原因是因为:mysql5.7 以后数据库安全密码策略需要更改,不能使用简单密码。

如图:

ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘huazai12345‘;

解决办法:

1、查询安全策略

输入语句 “ SHOW VARIABLES LIKE ‘validate_password%‘; ” 进行查看,
如下图:

2、针对5.7 更改安全策略

set global validate_password_policy=0;
set global validate_password_length=1;
set global validate_password_policy=0; 和 set global validate_password_policy=LOW; 是一样的。

针对5.8 使用

set global validate_password.policy=0;
set global validate_password.length=1;

3、set global validate_password_length=1;  默认长度是4,即使小于4,这里还是显示4。

4、注意这里更改密码不能使用:

ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘huazai12345‘;

而是使用

update user set password=password(‘huazai12345‘) where user=‘root‘;

5、再次验证是可以更改密码。

输入修改语句 “ ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘123456‘; ”

原文地址:https://www.cnblogs.com/pythonx/p/12215057.html

时间: 2024-11-03 03:58:00

mysql 修改密码提示ERROR 1819 (HY000): Your password does not satisfy the current policy requirements的相关文章

linux下mysql操作ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

关于这个问题是在 < 基于MySQL Yum存储库在Linux-7.2上安装MySQL-5.7.21数据库服务(实战篇) > 时遇到的问题,这是 mysql 初始化时,使用临时密码,修改自定义密码时,由于自定义密码比较简单,就出现了不符合密码策略的问题. 密码策略问题异常信息:ERROR 1819 (HY000): Your password does not satisfy the current policy requirements 如下图: 解决办法: 1.查看 mysql 初始的密码

ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

为了加强安全性,MySQL5.7为root用户随机生成了一个密码,在error log中,关于error log的位置,如果安装的是RPM包,则默认是/var/log/mysqld.log. 一般可通过log_error设置 mysql> select @@log_error; +---------------------+ | @@log_error | +---------------------+ | /var/log/mysqld.log | +---------------------

安装完绿色版MySQL修改密码:ERROR 1820 (HY000): You must reset your password using ALTER USER statement befo re executing this statement.

mysql> update mysql.user set password=PASSWORD('123456') where User='root';ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. 参考:http://dev.mysql.com/doc/refman/5.6/en/alter-user.html 直接执行:set

mysql修改密码Your password does not satisfy the current policy requirements

出现这个问题的原因是:密码过于简单.刚安装的mysql的密码默认强度是最高的,如果想要设置简单的密码就要修改validate_password_policy的值, validate_password_policy有以下取值: Policy Tests Performed 0 or LOW Length 1 or MEDIUM Length; numeric, lowercase/uppercase, and special characters 2 or STRONG Length; numer

mysql5.7设置简单密码报错ERROR 1819 (HY000): Your password

[问题] 有时候,只是为了自己测试,不想密码设置得那么复杂,譬如只想设置root的密码为123456. SET PASSWORD FOR 'root'@'localhost' = PASSWORD('123456'); 但是会报错: mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('123');ERROR 1819 (HY000): Your password does not satisfy the current policy re

mysql5.7密码过期ERROR 1862 (HY000): Your password has expired. To log in you must change

环境: ubuntu14.04  mysql5.7 一.mysql5.7 密码过期问题 报错: ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords. 翻译: 错误1862(HY000):你的密码已经过期.登录必须改变它使用一个客户端,支持过期的密码. 解决方法: 1. 用忽略授权表的方法进入mysql  

[mysql] ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords.

今天安装mysql遇到这样一个问题: ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords. 意思就是密码过期了. 修改密码了: mysql> SET PASSWORD = PASSWORD('abc'); ERROR 1819 (HY000): Your password does not satisfy

mysql更改数据库目录提示“ERROR 2002 (HY000): &#39;/var/lib/mysql/mysql.sock&#39; (2)”

操作系统环境如下: [[email protected] data]# cat /etc/issue CentOS release 6.7 (Final) Kernel \r on an \m [[email protected] data]# uname -r 3.19.0-25-generic [[email protected] data]# getconf LONG_BIT 64 mysql数据库由于yum安装方式,所以默认的数据库目录是/var/lib/mysql,也就是my.cnf文

处理一则MySQL Slave环境出现ERROR 1201 (HY000): Could not initialize master info structure的案例

mysql> start slave; ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository 处理一则MySQL Slave环境出现ERROR 1201 (HY000): Could not initialize master info structure的案例. 冷备份方式复制一份新的slave,初始化参数中已经修改了相关文件路径及server_id等关联参数. 但