lucifer [mysql]>update user set authentication_string=password('mysql') where user='root';
Query OK, 1 row affected, 1 warning (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 1
lucifer [mysql]>flush privileges;
Query OK, 0 rows affected (0.00 sec)
lucifer [mysql]>quit;
Bye
[root@mysql1 bin]# mysql -uroot -pmysql
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 7
Server version: 5.7.20
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.
lucifer [(none)]>show database;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'database' at line 1
lucifer [(none)]>
lucifer [(none)]>
lucifer [(none)]>
lucifer [(none)]>show databases;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
lucifer [(none)]>
lucifer [(none)]>
lucifer [(none)]>
lucifer [(none)]>exit
Bye
[root@mysql1 bin]#
[root@mysql1 bin]#
[root@mysql1 bin]#
[root@mysql1 bin]# mysql -uroot -pmysql
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 8
Server version: 5.7.20
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.
lucifer [(none)]>
lucifer [(none)]>show databases;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
lucifer [(none)]>
lucifer [(none)]>
lucifer [(none)]>set global validate_password_policy=0;
ERROR 1193 (HY000): Unknown system variable 'validate_password_policy'
lucifer [(none)]>
lucifer [(none)]>
lucifer [(none)]>set global validate_password_length=1;
ERROR 1193 (HY000): Unknown system variable 'validate_password_length'
lucifer [(none)]>
lucifer [(none)]>
lucifer [(none)]>set global validate_password_policy=LOW;
ERROR 1193 (HY000): Unknown system variable 'validate_password_policy'
lucifer [(none)]>
lucifer [(none)]>
lucifer [(none)]>FLUSH PRIVILEGES;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
lucifer [(none)]>SHOW VARIABLES LIKE 'validate_password%';
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
lucifer [(none)]>update user set authentication_string=password('Monk324ey') where user='root';
ERROR 1046 (3D000): No database selected
lucifer [(none)]>
lucifer [(none)]>
lucifer [(none)]>use mysql
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
lucifer [(none)]>
lucifer [(none)]>
lucifer [(none)]>use mysql
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
lucifer [(none)]>>update user set authentication_string=password('Monk324ey') where user='root';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '>update user set authentication_string=password('Monk324ey') where user='root'' at line 1
lucifer [(none)]>
lucifer [(none)]>
lucifer [(none)]>
lucifer [(none)]>
lucifer [(none)]>
lucifer [(none)]>set password=password('QAZwsx123');
Query OK, 0 rows affected, 1 warning (0.01 sec)
lucifer [(none)]>
lucifer [(none)]>exit
Bye
[root@mysql1 bin]#
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)