MySQL关闭密码强度验证功能
程序员文章站
2022-11-24 18:40:52
关于密码强度验证:
[root@mysql mysql]# mysql -uroot -p123456
mysql: [warning] using a pa...
关于密码强度验证:
[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关闭密码强度验证功能,希望对大家有所帮助
下一篇: Linux 正则表达式详解