is not_acer笔记本bios密码

is not_acer笔记本bios密码密码验证:mysql>createuserbackup@’%’identifiedWITHmysql_native_passwordby’backup’;ERROR1819(HY000):Yourpassw

is

--密码验证: mysql> create user backup@'%' identified WITH mysql_native_password by 'backup'; ERROR 1819 (HY000): Your password does not satisfy the current policy requirements 运行环境:centos7.4+MySQL8.0.11 背景知识: 在mysql 5.6对密码的强度进行了加强,推出了validate_password 插件,支持密码的强度要求。 在MySQL8.0.4版本开始默认修改为使用validate_password组件。 In MySQL 8.0.4, the validate_password plugin was reimplemented as the validate_password component. The plugin form of validate_password is still available but is deprecated and will be removed in a future version of MySQL. MySQL installations that use the plugin should make the transition to using the component instead. 官方的解释:validate_password插件被重新实现为validate_password组件。validate_password在8.0中的组件格式仍然可用但是未来的版本会删除此功能。 使用插件安装的mysql可以转换为组件。 # ls -l /usr/local/mysql/lib/plugin/ | grep -i validate -rwxr-xr-x 1 7161 31415  Apr 8 16:16 component_validate_password.so -rwxr-xr-x 1 7161 31415  Apr 8 16:15 validate_password.so 可以看到在8.0.11版本中组件和插件是共存的。 安装组件: 组件只需要执行一次而不需要每次在server启动后执行,INSTALL COMPONENT 命令加载组件并注册到系统表mysql.component,此后server启动都会加载。 Password Validation Component的安装和卸载: mysql> INSTALL COMPONENT 'file://component_validate_password'; Query OK, 0 rows affected (2.31 sec) mysql> UNINSTALL COMPONENT 'file://component_validate_password'; Query OK, 0 rows affected (0.21 sec) mysql> show variables like 'validate_password%'; Empty set (0.01 sec) mysql> INSTALL COMPONENT 'file://component_validate_password'; Query OK, 0 rows affected (0.30 sec) mysql> select * from mysql.component; +--------------+--------------------+------------------------------------+ | component_id | component_group_id | component_urn | +--------------+--------------------+------------------------------------+ | 1 | 1 | file://component_validate_password | +--------------+--------------------+------------------------------------+ 1 row in set (0.00 sec) mysql> show variables like 'validate_password%'; +--------------------------------------+--------+ | Variable_name | Value | +--------------------------------------+--------+ | validate_password.check_user_name | ON | | validate_password.dictionary_file | | | validate_password.length | 8 | | validate_password.mixed_case_count | 1 | | validate_password.number_count | 1 | | validate_password.policy | MEDIUM | | validate_password.special_char_count | 1 | +--------------------------------------+--------+ 7 rows in set (0.00 sec) 可以看到在5.7版本中的validate_password_被替换为validate_password. validate_password.check_user_name:ON/OFF validate_password.dictionary_file:插件用于验证密码强度的字典文件路径。 validate_password.length:密码最小长度。 validate_password.mixed_case_count:密码至少要包含的小写字母个数和大写字母个数。 validate_password.number_count:密码至少要包含的数字个数。 validate_password.policy:密码强度检查等级,0/LOW、1/MEDIUM、2/STRONG。 validate_password.special_char_count:密码至少要包含的特殊字符数。 密码长度: validate_password.length validate_password.number_count + validate_password.special_char_count + (2 * validate_password.mixed_case_count) 密码策略: Policy Tests Performed 0 or LOW Length 1 or MEDIUM Length; numeric, lowercase/uppercase, and special characters 2 or STRONG Length; numeric, lowercase/uppercase, and special characters; dictionary file 默认是1,即MEDIUM,所以刚开始设置的密码必须符合长度,且必须含有数字,小写或大写字母,特殊字符。 -- 查看密码验证状态: mysql> SHOW STATUS LIKE 'validate_password.%'; +-----------------------------------------------+---------------------+ | Variable_name | Value | +-----------------------------------------------+---------------------+ | validate_password.dictionary_file_last_parsed | 2018-07-12 10:05:50 | | validate_password.dictionary_file_words_count | 0 | +-----------------------------------------------+---------------------+ 2 rows in set (0.75 sec) validate_password.length参数默认为8,它有最小值的限制,最小值为: validate_password.number_count + validate_password.special_char_count + (2 * validate_password.mixed_case_count) 这些参数,默认值均为1,所以validate_password_length最小值为4, 如果你显性指定validate_password.length的值小于4,尽管不会报错,但validate_password.length的值将设为4。 --验证密码最小值为4; mysql> select version(); +-----------+ | version() | +-----------+ | 8.0.11 | +-----------+ 1 row in set (0.00 sec) mysql> set global validate_password.length=3; Query OK, 0 rows affected (0.00 sec) mysql> show variables like 'validate_password%'; +--------------------------------------+--------+ | Variable_name | Value | +--------------------------------------+--------+ | validate_password.check_user_name | ON | | validate_password.dictionary_file | | | validate_password.length | 4 | | validate_password.mixed_case_count | 1 | | validate_password.number_count | 1 | | validate_password.policy | MEDIUM | | validate_password.special_char_count | 1 | +--------------------------------------+--------+ 7 rows in set (0.01 sec) --验证密码长度: 如果修改了validate_password_number_count,validate_password_special_char_count,validate_password_mixed_case_count中任何一个值,则validate_password_length将进行动态修改。 mysql> set global validate_password.length=4; Query OK, 0 rows affected (0.00 sec) mysql> select @@validate_password.length; +----------------------------+ | @@validate_password.length | +----------------------------+ | 4 | +----------------------------+ 1 row in set (0.00 sec) mysql> show variables like 'validate_password%'; +--------------------------------------+--------+ | Variable_name | Value | +--------------------------------------+--------+ | validate_password.check_user_name | ON | | validate_password.dictionary_file | | | validate_password.length | 4 | | validate_password.mixed_case_count | 1 | | validate_password.number_count | 1 | | validate_password.policy | MEDIUM | | validate_password.special_char_count | 1 | +--------------------------------------+--------+ 7 rows in set (0.01 sec) mysql> set global validate_password.number_count=2; Query OK, 0 rows affected (0.07 sec) mysql> show variables like 'validate_password%'; +--------------------------------------+--------+ | Variable_name | Value | +--------------------------------------+--------+ | validate_password.check_user_name | ON | | validate_password.dictionary_file | | | validate_password.length | 5 | | validate_password.mixed_case_count | 1 | | validate_password.number_count | 2 | | validate_password.policy | MEDIUM | | validate_password.special_char_count | 1 | +--------------------------------------+--------+ 7 rows in set (0.00 sec) 先将密码的总长度修改为4位,并验证生效。修改了数字的位数为2密码的总长度自然增加到5位。 上述的前提条件是 validate_password插件或者组件必须已经安装。 --查看密码长度的方法: mysql> select @@validate_password.length; +----------------------------+ | @@validate_password.length | +----------------------------+ | 8 | +----------------------------+ 1 row in set (0.02 sec) mysql> show variables like 'validate_password.length'; +--------------------------+-------+ | Variable_name | Value | +--------------------------+-------+ | validate_password.length | 8 | +--------------------------+-------+ 1 row in set (0.04 sec) 大多数时候不需要设置密码那么复杂,只需要设置简单的密码长度即可。 此时可以动态设置: 首先,修改validate_password_policy参数的值 set global validate_password_policy=0; set global validate_password.length=4; 在实际应用中多数不需要验证密码的强度则可以直接删除组件即可,此后则不需要密码的复杂度验证了。当然生产环境还是需要密码强度的,在生产环境有经验的人员则会自然设置复杂的密码,有了这个验证反而会比较麻烦。 mysql> UNINSTALL COMPONENT 'file://component_validate_password'; Query OK, 0 rows affected (0.29 sec) mysql> show variables like 'validate_password%'; Empty set (0.00 sec) mysql> create user backup@'%' identified WITH mysql_native_password by 'backup'; Query OK, 0 rows affected (0.26 sec) 卸载组件或者插件之后修改用户名和密码就没有报错的提示了。

今天的文章
is not_acer笔记本bios密码分享到此就结束了,感谢您的阅读。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/80561.html

(0)
编程小号编程小号

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注