Centos7 下禁用Mysql密码的强度加强validate_password插件

来源:互联网 发布:手写图片识别软件 编辑:程序博客网 时间:2024/04/30 12:37

MySQL 对密码的强度进行了加强,推出了validate_password插件

关闭找到 /etc/my.conf 添加

validate_password=off 

修改Mysql密码
禁用密码验证机制 /etc/my.cnf 添加

skip-grant-tables

运行

use mysql;update user set authentication_string=password('你的密码') where user='你的用户';
use mysql;UPDATE user SET Password = password('你的密码') WHERE User='你的用户';

授权主机登陆 (% 允许所有主机登陆)

grant all privileges on *.* to '你的用户'@'%' identified by '你的密码' withg rant option;

刷新

flush privileges;

番外当use mysql;提示

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

那么

SET PASSWORD = PASSWORD('你的密码');

授权
你的主机 % 表示任意主机;

grant all on *.* to root@'你的主机' identified by '你的密码';

防火墙
查看

firewall-cmd --list-all

开启端口

firewall-cmd --add-port=3306/tcp --permanent

重启mysql服务

service mysqld restart
0 0
原创粉丝点击