事件时间:2020.09.21
事件描述:MySQL输入密码无效。
事件错误详述:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
事件解决办法:
net stop mysql 停止MySQL服务
删除MySQL文件夹中data文件夹
net start mysql 启动MySQL服务
mysqld --initialize --user=root --console 创建root数据库
mysql -u root -p 进入数据库,输入初始密码
\s 显示ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
alter user user()identified by "123456"; 显示Query OK, 0 rows affected (0.01 sec) 修改成功