这个账号不予许从远程访问登录,只能在localhost 这个时候需要修改localhost的电脑 登录mysql之后更改“mysql”数据库里的user 表中的host选项 从“localhost”改成‘%“
执行sql语句:
update user set host='%' where user='root';
flush privileges;
就可以了应该。
如果登录报错:
那么还需要再给刷新下权限信息:
alter user '%' identified with mysql_native_password by '密码';
flush privileges;
结束