工做主要为两部分, 一部分是 Windows 防火墙, 一部分是 MySQL 自身mysql
其实就是在 Windows 防火墙中加一条特定端口的入站规则sql
思路就是为远程用户名添加其余主机的访问权限数据库
mysql -u root -p # 输入密码进入 mysql use mysql; # 如下命令选其一便可, 推荐第一种 # 第二种字段可能有所改变, 根据实际状况肯定 grant all privileges on '想远程访问的数据库名'.* to 'root'@'%' identified by "password"; update user set host = '%' where user = 'root';