ing 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 17
Server version: 5.7.3-m13 MySQL Community Server (GPL)
Copyright (c) 2000, 2013, 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>
其实我们还可以直接使用update语句来修改user这个表,但是我们需要使用flush privileges;来让它立即生效:
mysql> update mysql.user set password = password('nan') where user = 'test';
Query OK, 1 row affected (0.05 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.03 sec)
然后我们就可以用'nan‘这个密码登录了,我这里就不给出演示代码了,毕竟很简单的操作,我是辛星,求支持。