MySQL关闭密码强度验证功能

 更新时间:2017年06月22日 09:26:49   作者:songyb  
本文通过实例代码给大家介绍了mysql关闭密码强度验证功能,非常不错,具有参考借鉴价值,需要的朋友参考下吧

关于密码强度验证:

[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动态创建表,数据分表的存储过程,需要的朋友可以参考下。
    2011-08-08
  • MySQL中的临时表与内存表

    MySQL中的临时表与内存表

    这篇文章主要介绍了MySQL中的临时表与内存表,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教
    2024-01-01
  • MySQL 表空间碎片的概念及相关问题解决

    MySQL 表空间碎片的概念及相关问题解决

    这篇文章主要介绍了MySQL 表空间碎片的概念及相关问题解决,帮助大家更好的理解和学习使用MySQL,感兴趣的朋友可以了解下
    2021-05-05
  • mysql中的临时表如何使用

    mysql中的临时表如何使用

    这篇文章主要介绍了mysql中的临时表如何使用,具有很好的参考价值,希望对大家有所帮助。如有错误或未考虑完全的地方,望不吝赐教
    2022-09-09
  • Mysql8.0轻松实现主从复制

    Mysql8.0轻松实现主从复制

    这篇文章主要介绍了Mysql8.0轻松实现主从复制方法的相关资料,需要的朋友可以参考下
    2022-11-11
  • MySQL查询冗余索引和未使用过的索引操作

    MySQL查询冗余索引和未使用过的索引操作

    这篇文章主要介绍了MySQL查询冗余索引和未使用过的索引操作,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
    2021-03-03
  • 通过MySQL慢查询优化MySQL性能的方法讲解

    通过MySQL慢查询优化MySQL性能的方法讲解

    今天小编就为大家分享一篇关于通过MySQL慢查询优化MySQL性能的方法讲解,小编觉得内容挺不错的,现在分享给大家,具有很好的参考价值,需要的朋友一起跟随小编来看看吧
    2019-03-03
  • 在SQL中修改数据的基础语句

    在SQL中修改数据的基础语句

    修改数据SQL中,可以使用UPDATE语句来修改、更新一个或多个表的数据,下面这篇文章主要给大家介绍了关于在SQL中修改数据的基础语句,文中通过实例代码介绍的非常详细,需要的朋友可以参考下
    2023-02-02
  • Mysql系统变量与状态变量详细介绍

    Mysql系统变量与状态变量详细介绍

    这篇文章主要介绍了Mysql系统变量与状态变量详细介绍,能够在程序运行过程中影响Mysql程序行为的变量称之为系统变量,想了解更多相关内容的小伙伴可以参考下面文章内容
    2022-09-09
  • MySQL COUNT(*)性能原理详解

    MySQL COUNT(*)性能原理详解

    这篇文章主要介绍了MySQL COUNT(*)性能原理详解,文章围绕主题展开详细的内容介绍,具有一定的参考价值,需要的小伙伴可以参考一下
    2022-08-08

最新评论