同事;你安装的mysql有问题啊…
问题;
同事搞数据采集时无法访问我安装的MySQL…
原因;
在windows服务器后 安装MySQL后没开启对外访问权限...
解决步骤;
1、更新域属性
2、更新授权
3、开放windows服务器的端口
一、更新域属性
登录MySQL;并且进入mysql库 use mysql
更新域属性;%表示允许外部访问
update user set host=% where user =;root;;
执行完来一句 FLUSH PRIVILEGES;使设置权限生效

二、更新授权
再执行授权语句
GRANT ALL PRIVILEGES ON *.* TO ;root;;% WITH GRANT OPTION;

再来 FLUSH PRIVILEGES;使设置权限生效;再度确认咯;
三、开放windows服务器的端口
windows搜索防火墙

右键新建规则

选择端口

填写端口号

设置允许连接

勾选配置

输入名称即可

最后重启一下MySQL就可以咯
先停掉MySQL服务
执行命令; net stop mysql 重启MySQL
执行命令;net start mysql