ERROR 1820 (HY000): You must reset your password using ALTER USER statement befo
re executing this statement.
解决方式:
alter user 'root'@'localhost' identified by '123456';
忘记root密码
解决方式:
1、停数据库 net stop mysql;
2、进入CMD,进入MySQL的安装目录,假设是D:/MySQL/MySQL Server 5.0/; 3、mysqld-nt –skip-grant-tables 4、重新打开一个CMD, mysqladmin -uroot flush-privileges password “newpassword” 将newpassword替换为你的新密码,第二个命令会让你重复输入一次新 密码。
或者使用如下语句:
update mysql.user set authentication_string=PASSWORD('新密码') where User='root'
flush privileges;quit;5、 在cmd里net start mysql