1.登录本地数据库找到mysql/user表 把Host里面localhost改为% 2.xshell 用命令 \mysql>update user set Host = '%' where User ='root';