mysql 1130 问题

找到自己mysql的安装目录,找到 my.ini,在[mysqld]的段中加上一句:skip-grant-tables(作用是跳过用户登录过程,直接登录上mysql)

而后就可以在cmd中登录mysql,然后

mysql> use mysql;  

mysql> update user set password=password('123') where user='root' and host='localhost';  

mysql> flush privileges;  

修改密码

以上解决方法,亲测可用。

原文地址:https://www.cnblogs.com/AI-Cobe/p/9300405.html