安装MySQL之后进入MySQL设置简单的密码比如 "123456"
这样的会提示密码设置的太简单了,正常需要大小写数字加特殊符号的,如果要设置简单的可以做以下两个设置即可:
mysql> set global validate_password_policy=0;
Query OK, 0 rows affected (0.00 sec)
mysql> set global validate_password_length=6;
Query OK, 0 rows affected (0.00 sec)
设置完就可以设置简单密码了:
mysql> set password = password('123456');
Query OK, 0 rows affected, 1 warning (0.00 sec)
然后就可以退出重新进入MySQL验证:
[root@jason 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 5
Server version: 5.7.21 MySQL Community Server (GPL)
Copyright (c) 2000, 2018, 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>