标签:password cli img inf like port from src class
在navicat中连接虚拟机中的MySQL数据库时出现以下报错:
1、查看用户信息
select Host,User,plugin,authentication_string from mysql.user ;
备注:host为%表示不限制ip,localhost表示本机使用,plugin非mysql_native_password则需要修改密码
2、修改用户密码
ALTER USER ‘root‘@‘%‘ IDENTIFIED WITH mysql_native_password BY ‘newpassword‘;
FLUSH PRIVILEGES;
注:这里可能会碰到以下报错:
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
解决办法:
查看mysql初始的密码策略:
SHOW VARIABLES LIKE ‘validate_password%‘;
需要设置密码的验证强度等级,设置 validate_password_policy 的全局参数为 LOW 即可
SET GLOBAL validate_password_policy = LOW;
mysql服务设置远程连接 解决1251 client does not support ..问题
标签:password cli img inf like port from src class
原文地址:https://www.cnblogs.com/gentlemanwuyu/p/11624254.html