mysql 5.7版本安装后,首次操作,总是报错:
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
解决办法:
mysql> SET PASSWORD = PASSWORD(‘root’);
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> ALTER USER ‘root’@'localhost’ PASSWORD EXPIRE NEVER;
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)