1.数据库权限问题:开放权限
grant [权限] on [数据库名].[表名] to ['用户名']@['web服务器的ip地址'] identified by ['密码'];
- grant all on *.* to 'root'@'%' identified by 'root';
或者指定IP地址
- grant all on *.* to 'root'@'192.168.1.103' identified by 'root';
2.Linux防火墙
临时关闭 :当Linux服务器重启时防火墙重新启动
- service iptables stop 关闭防火墙
- service iptables start 启动防火墙
- systemctl status firewalld --查看防火墙状态
- systemctl start firewalld --开启防火墙
- systemctl stop firewalld --关闭防火墙
永久关闭:
- chkconfig iptables off 关闭
- chkconfig iptables on 开启
3.本身主机防火墙问题