选择mysql数据库use mysql;重置密码:update user set authentication_string=password(''),plugin='mysql_native_password' where user='root';刷新flush privileges;搞定
选择mysql数据库use mysql;