1、找到mysql 的配置文件 my.ini 2、在文件中 [mysqld] 的 下面一行 加上 skip-grant-tables,保存文件 3、重启 mysql 4、登录 mysql 时,不输入密码,直接回车即可