MySQL关闭密码强度验证

来源:互联网 发布:win10网络共享速度慢 编辑:程序博客网 时间:2024/04/28 12:11

关于密码强度验证:


[root@mysql mysql]# mysql -uroot -p123456mysql: [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 4Server version: 5.7.18Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> mysql> mysql> use mysqlERROR 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 requirementsmysql> exitBye[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 = 2Mdatadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sock# Disabling symbolic-links is recommended to prevent assorted security riskssymbolic-links=0log-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pidplugin-load=validate_password.sovalidate-password=OFF~~~~~~~~"/etc/my.cnf" 30L, 1016C written[root@mysql mysql]# service mysqld restartStopping mysqld:                                           [  OK  ]Starting mysqld:                                           [  OK  ][root@mysql mysql]# mysql -uroot -p123456mysql: [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 4Server version: 5.7.18Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql>  mysql> mysql> use mysqlERROR 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> 

The End.