Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 0x01 检查防火墙是否放行3306
- # 0x02 查看3306监听情况
- `$ netstat -an | grep 3306`
- ```tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN```
- 这样的就是3306端口只是在IP 127.0.0.1上监听,所以拒绝了其他IP的访问。
- ## 解决办法
- `vim /etc/mysql/my.cnf`
- `bind-address = 127.0.0.1` -> `# bind-address = 127.0.0.1`
- ## 正常结果
- ```
- $ netstat -an | grep 3306
- tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
- ```
- # 0x04 检查mysql账户是否拥有外网访问权限
Add Comment
Please, Sign In to add comment