yourpassword变成你自己的
grant all privileges on *.* to 'root'@'%' indentified by 'yourpassword' with grant option;
刷新
flush privileges;
#安装插件# INSTALL SONAME 'simple_password_check'; #设置输入错误多少次锁定# set global max_password_errors = 10; #开启密码复杂度# set global disconnect_on_expired_password=on; #查看变量 show variables like '%password%'; #数据库密码插件及配置 # 密码中至少包含几位数字 simple_password_check_digits=N # 密码中至少几位字母 simple_password_check_letters_same_case=N # 密码至少几位 simple_password_check_minimal_length=N # 密码中特殊符号(非字母和数字)至少几位 simple_password_check_other_characters=N # cracklib字典的路径 cracklib_password_check=DIR