MySQL关闭密码强度验证功能

所属分类: 数据库 / Mysql 阅读数: 205
收藏 0 赞 0 分享

关于密码强度验证:

[root@mysql mysql]# mysql -uroot -p123456 
mysql: [Warning] Using a password on the command line interface can be insecure. 
Welcome to the MySQL monitor. Commands end with ; or \g. 
Your MySQL connection id is 4 
Server version: 5.7.18 
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. 
Oracle is a registered trademark of Oracle Corporation and/or its 
affiliates. Other names may be trademarks of their respective 
owners. 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 
mysql>  
mysql>  
mysql> use mysql 
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. 
mysql> SET PASSWORD = PASSWORD(''); 
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements 
mysql> exit 
Bye 
[root@mysql mysql]#  
[root@mysql mysql]#  
[root@mysql mysql]# vi /etc/my.cnf 
# For advice on how to change settings please see 
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html 
[mysqld] 
# 
# Remove leading # and set to the amount of RAM for the most important data 
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. 
# innodb_buffer_pool_size = 128M 
# 
# Remove leading # to turn on a very important data integrity option: logging 
# changes to the binary log between backups. 
# log_bin 
# 
# Remove leading # to set options mainly useful for reporting servers. 
# The server defaults are faster for transactions and fast SELECTs. 
# Adjust sizes as needed, experiment to find the optimal values. 
# join_buffer_size = 128M 
# sort_buffer_size = 2M 
# read_rnd_buffer_size = 2M 
datadir=/var/lib/mysql 
socket=/var/lib/mysql/mysql.sock 
# Disabling symbolic-links is recommended to prevent assorted security risks 
symbolic-links=0 
log-error=/var/log/mysqld.log 
pid-file=/var/run/mysqld/mysqld.pid 
plugin-load=validate_password.so 
validate-password=OFF 
~ 
~ 
~ 
~ 
~ 
~ 
~ 
~ 
"/etc/my.cnf" 30L, 1016C written 
[root@mysql mysql]# service mysqld restart 
Stopping mysqld:                      [ OK ] 
Starting mysqld:                      [ OK ] 
[root@mysql mysql]# mysql -uroot -p123456 
mysql: [Warning] Using a password on the command line interface can be insecure. 
Welcome to the MySQL monitor. Commands end with ; or \g. 
Your MySQL connection id is 4 
Server version: 5.7.18 
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. 
Oracle is a registered trademark of Oracle Corporation and/or its 
affiliates. Other names may be trademarks of their respective 
owners. 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 
mysql>  
mysql>  
mysql> use mysql 
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. 
mysql> SET PASSWORD = PASSWORD(''); 
Query OK, 0 rows affected, 1 warning (0.00 sec) 
mysql>  

以上所述是小编给大家介绍的MySQL关闭密码强度验证功能,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!

更多精彩内容其他人还在看

mysql视图之创建可更新视图的方法详解

这篇文章主要介绍了mysql视图之创建可更新视图的方法,结合实例形式分析了mysql可更新视图的具体创建、使用方法及相关操作注意事项,需要的朋友可以参考下
收藏 0 赞 0 分享

mysql视图之确保视图的一致性(with check option)操作详解

这篇文章主要介绍了mysql视图之确保视图的一致性(with check option)操作,结合实例形式详细分析了视图的一致性操作原理、实现技巧与操作注意事项,需要的朋友可以参考下
收藏 0 赞 0 分享

mysql视图之创建视图(CREATE VIEW)和使用限制实例详解

这篇文章主要介绍了mysql视图之创建视图(CREATE VIEW)和使用限制,结合实例形式详细分析了mysql视图创建于使用相关原理与操作注意事项,需要的朋友可以参考下
收藏 0 赞 0 分享

mysql视图之管理视图实例详解【增删改查操作】

这篇文章主要介绍了mysql视图之管理视图,结合实例形式详细分析了mysql视图增删改查操作具体实现技巧与相关操作注意事项,需要的朋友可以参考下
收藏 0 赞 0 分享

mysql触发器简介、创建触发器及使用限制分析

这篇文章主要介绍了mysql触发器简介、创建触发器及使用限制,结合实例形式分析了mysql触发器的功能、原理、创建、用法及操作注意事项,需要的朋友可以参考下
收藏 0 赞 0 分享

windows下安装mysql-8.0.18-winx64的教程(图文详解)

这篇文章主要介绍了windows下安装mysql-8.0.18-winx64,需要的朋友可以参考下
收藏 0 赞 0 分享

如何将mysql存储位置迁移到一块新的磁盘上

这篇文章主要介绍了如何将mysql存储位置迁移到一块新的磁盘上,本文给大家介绍的非常详细,具有一定的参考借鉴价值,需要的朋友可以参考下
收藏 0 赞 0 分享

mysql触发器之创建使用触发器简单示例

这篇文章主要介绍了mysql触发器之创建使用触发器,结合实例形式分析了mysql创建、查看、调用触发器的相关操作技巧,需要的朋友可以参考下
收藏 0 赞 0 分享

mysql触发器之创建多个触发器操作实例分析

这篇文章主要介绍了mysql触发器之创建多个触发器操作,结合实例形式分析了mysql创建及使用多个触发器的相关操作技巧,需要的朋友可以参考下
收藏 0 赞 0 分享

MySQL索引长度限制原理解析

这篇文章主要介绍了MySQL索引长度限制原理解析,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
收藏 0 赞 0 分享
查看更多