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或者卸载重装,但是如果MySQL不能清理干净的话是很容易出现问题的,这篇文章主要给大家介绍了关于如何彻底卸载MySQL数据库的相关资料,需要的朋友可以参考下
    2022-06-06
  • navicat不能创建函数解决方法分享

    navicat不能创建函数解决方法分享

    这篇文章主要介绍了navicat不能创建函数解决方法分享,小编觉得还是挺不错的,这里分享给大家,供需要的朋友参考。
    2017-10-10
  • mysql对binlog的处理说明

    mysql对binlog的处理说明

    Mysql和其它开源数据库相比,具有更好的扩展性。其主要原因是它提供了存储引擎的开放接口。喜欢自己折腾数据库的程序员可以从这个接口起步,打造有个性的数据库。
    2011-07-07
  • mysql连接过多和死掉以及拒绝服务的解决方法

    mysql连接过多和死掉以及拒绝服务的解决方法

    mysql连接过多和死掉以及拒绝服务的解决方法...
    2007-12-12
  • 查看MySQL是否处于运行状态的常见方法

    查看MySQL是否处于运行状态的常见方法

    在管理 MySQL 数据库的过程中,了解并掌握如何查看 MySQL 的运行状态至关重要,这不仅可以帮助我们及时发现潜在的问题,还能确保数据库系统的稳定性和性能,本文将详细介绍通过不同的方法来查看 MySQL 是否处于运行状态的常见方法
    2025-02-02
  • Windows中MySQL root用户忘记密码解决方案

    Windows中MySQL root用户忘记密码解决方案

    在实际应用中,经常会出现忘记mysql管理员用户root的密码的情况出现,那么我们如何来设置一个新密码从而登录数据库呢,下面我们来探讨下
    2014-07-07
  • 简单介绍MySQL中GROUP BY子句的使用

    简单介绍MySQL中GROUP BY子句的使用

    这篇文章主要介绍了简单介绍MySQL中GROUP BY子句的使用,是MySQL入门学习中的基础知识,需要的朋友可以参考下
    2015-05-05
  • mysql安装图解总结

    mysql安装图解总结

    本篇文章给大家总结了在各种电脑环境系统下安装MYSQL的图解过程,以及遇到问题后的解决办法。
    2018-06-06
  • mysql如何将表结构导出到excel

    mysql如何将表结构导出到excel

    这篇文章主要介绍了mysql如何将表结构导出到excel,帮助大家更好的理解和使用MySQL数据库,感兴趣的朋友可以了解下
    2020-09-09
  • mysql日期date型和int型互换的方法

    mysql日期date型和int型互换的方法

    下面小编就为大家带来一篇mysql日期date型和int型互换的方法。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧
    2016-10-10

最新评论