ERROR 1820 (HY000): You must SET PASSWORD before executing this statement

今天,打开mysql.

可以正常登陆,但是输入命令时却报错:

ERROR 1820 (HY000): You must SET PASSWORD before executing this statement_第1张图片

解决办法:

--重新设置一次密码:

mysql> SET PASSWORD=PASSWORD('beijing')
    -> ;
Query OK, 0 rows affected (0.00 sec)

--现在,再输入命令,就不再报错了:

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.01 sec)

 

--本篇文章参考自:http://www.2cto.com/database/201306/223039.html

你可能感兴趣的:(ERROR 1820 (HY000): You must SET PASSWORD before executing this statement)