一.检查IP地址
出现IP地址没有情况即网络出现问题
1.查看网络配置文件
[root@mysql2 ~]# cd /etc/sysconfig/network-scripts/
[root@mysql2 network-scripts]# ls
ifcfg-ens33 ifdown-ippp ifdown-routes ifup ifup-ipv6 ifup-ppp ifup-tunnel
ifcfg-lo ifdown-ipv6 ifdown-sit ifup-aliases ifup-isdn ifup-routes ifup-wireless
ifdown ifdown-isdn ifdown-Team ifup-bnep ifup-plip ifup-sit init.ipv6-global
ifdown-bnep ifdown-post ifdown-TeamPort ifup-eth ifup-plusb ifup-Team network-functions
ifdown-eth ifdown-ppp ifdown-tunnel ifup-ippp ifup-post ifup-TeamPort network-functions-ipv6
[root@mysql2 network-scripts]#vim ifcfg-ens33
2.nmcli 是networkmanager服务的客户端工具
nmcli - command-line tool for controlling NetworkManager[root@sc-server ~]# nmcli n 查看你的网络是否启用
enabled
[root@sc-server ~]# nmcli n off 禁用网络功能
[root@sc-server ~]# nmcli n on 启用网络功能
3.重启网络服务
[root@mysql2 network-scripts]# service network restart
Restarting network (via systemctl): [ 确定 ]