因为初次安装的时候会引起权限问题,使用跳过权限并修改密码的方式可以解决
1.进入cmd,利用net stop mysql关闭mysql服务
2.进入E:\mysql\bin\mysqld -nt --skip-grant-tables 跳过权限检查进入mysql
3.重新进入cmd,E:\mysql\bin\mysqladmin -u root flush-privileges password "newpassword"
4.成功进入mysql后,输入命令update user set password=password('1234') where user="root";
此时有可能提示没有password这一列,原因是在跳过权限的时候password列字段被命名为了authentication_string
update user set authentication_string=password('1234') where user="root";