打开services.msc找到mysql的bin目录 命令行cd到bin目录,然后 MySQL -uroot -p 输入密码 grant all PRIVILEGES on *.* to root@' (输入你的ip)' identified by '123456'; flush privileges;