错误一、1045
错误二、1290 (HY000): The MySQL server is running with the --skip-grant-tables optio
解决方法:
1.首先在my.ini中添加 [mysqld] 语句下skip-grant-tables语句
2.并重启服务
3.win+R 输入MySQL,打开mysql控制台后不输入密码,直接回车
4.先刷新数据库 flush privileges; 重复操作,直到刷出一下语句为止
Query OK, 0 rows affected (0.01 sec)
5. 修改root的密码,set password for root@localhost = password('root');
6.大功告成,万事大吉
注,如果修改不行,可以尝试创建新的账户,如:
create user 'root'@'localhost' identified by 'root';