• 售前

  • 售后

热门帖子
入门百科

MySQL关闭密码强度验证功能

[复制链接]
孙悟空748 显示全部楼层 发表于 2021-10-25 19:18:07 |阅读模式 打印 上一主题 下一主题
关于暗码强度验证:
  1. [root@mysql mysql]# mysql -uroot -p123456
  2. mysql: [Warning] Using a password on the command line interface can be insecure.
  3. Welcome to the MySQL monitor. Commands end with ; or \g.
  4. Your MySQL connection id is 4
  5. Server version: 5.7.18
  6. Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  7. Oracle is a registered trademark of Oracle Corporation and/or its
  8. affiliates. Other names may be trademarks of their respective
  9. owners.
  10. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  11. mysql>  
  12. mysql>  
  13. mysql> use mysql
  14. ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
  15. mysql> SET PASSWORD = PASSWORD('');
  16. ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
  17. mysql> exit
  18. Bye
  19. [root@mysql mysql]#  
  20. [root@mysql mysql]#  
  21. [root@mysql mysql]# vi /etc/my.cnf
  22. # For advice on how to change settings please see
  23. # http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
  24. [mysqld]
  25. #
  26. # Remove leading # and set to the amount of RAM for the most important data
  27. # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
  28. # innodb_buffer_pool_size = 128M
  29. #
  30. # Remove leading # to turn on a very important data integrity option: logging
  31. # changes to the binary log between backups.
  32. # log_bin
  33. #
  34. # Remove leading # to set options mainly useful for reporting servers.
  35. # The server defaults are faster for transactions and fast SELECTs.
  36. # Adjust sizes as needed, experiment to find the optimal values.
  37. # join_buffer_size = 128M
  38. # sort_buffer_size = 2M
  39. # read_rnd_buffer_size = 2M
  40. datadir=/var/lib/mysql
  41. socket=/var/lib/mysql/mysql.sock
  42. # Disabling symbolic-links is recommended to prevent assorted security risks
  43. symbolic-links=0
  44. log-error=/var/log/mysqld.log
  45. pid-file=/var/run/mysqld/mysqld.pid
  46. plugin-load=validate_password.so
  47. validate-password=OFF
  48. ~
  49. ~
  50. ~
  51. ~
  52. ~
  53. ~
  54. ~
  55. ~
  56. "/etc/my.cnf" 30L, 1016C written
  57. [root@mysql mysql]# service mysqld restart
  58. Stopping mysqld:                      [ OK ]
  59. Starting mysqld:                      [ OK ]
  60. [root@mysql mysql]# mysql -uroot -p123456
  61. mysql: [Warning] Using a password on the command line interface can be insecure.
  62. Welcome to the MySQL monitor. Commands end with ; or \g.
  63. Your MySQL connection id is 4
  64. Server version: 5.7.18
  65. Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  66. Oracle is a registered trademark of Oracle Corporation and/or its
  67. affiliates. Other names may be trademarks of their respective
  68. owners.
  69. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  70. mysql>  
  71. mysql>  
  72. mysql> use mysql
  73. ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
  74. mysql> SET PASSWORD = PASSWORD('');
  75. Query OK, 0 rows affected, 1 warning (0.00 sec)
  76. mysql>  
复制代码
以上所述是小编给大家先容的MySQL关闭暗码强度验证功能,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会实时回复大家的。在此也非常感谢大家对草根技术分享网站的支持!

帖子地址: 

回复

使用道具 举报

分享
推广
火星云矿 | 预约S19Pro,享500抵1000!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

草根技术分享(草根吧)是全球知名中文IT技术交流平台,创建于2021年,包含原创博客、精品问答、职业培训、技术社区、资源下载等产品服务,提供原创、优质、完整内容的专业IT技术开发社区。
  • 官方手机版

  • 微信公众号

  • 商务合作