mysql5.7赋予root远程权限出现 ERROR 1819 (HY000):和远程出错解决方法

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

我这边是mysql5.6升级成5.7版本造成的

1.首先进入mysql

2.执行

show variables like '%56%';

得到:

3.然后执行

SHOW VARIABLES LIKE 'validate_password%';

得到

4.执行

 set global validate_password_policy=0;

5.执行

set global validate_password_length=1;

6.再次执行

SHOW VARIABLES LIKE 'validate_password%';

会得到

7.赋予root权限

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' ;

这次就不会报错了

8.刷新权限

flush privileges;

远程出现问题:

Access denied for user 'root'@‘xxx.xxx.xxx.xxx’ (using password: YES)

解决方法:

进入mysql 添加添加这个即可

grant all privileges on *.* to root@'%' identified by 'root';

 

 

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值