1.重装问题
net stop mysql
删除data文件夹里的内容
mysqld remove
mysqld install
2.root权限密码问题
net stop mysql
mysqld --shared-memory --skip-grant-tables
打开新的窗口
mysql -uroot -p
use mysql;
update user set authentication_string='' where user='root';
alter user 'root'@'localhost' identified by 'newpassword';
如未成功请尝试
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'yourpassword';