首先关闭mysql服务,在mysql中的bin目录下,输入mysqld --skip-grant-tables, 此cmd不关,开一个新的cmd,到mysql的bin目录下,直接输入mysql,进入mysql,输入下面的命令, 1 2 3 4 5 use mysql; update user set authentication_string=PASSWORD("") where User='root'; update user set plugin="mysql_native_password" where User='root'; # THIS LINE flush privileges; quit;