异常信息:
异常:com.mysql.jdbc.exceptions.jdbc4.communicationException:communication link failure
last packet sent to the server was 0 ms ago
at sun.refect.nativecon.........等等
分析问题:
1、查看本机与数据库网络是否有问题
2、查看数据库服务器防火墙是否关闭,防火墙关闭,防火墙关闭,重要事说三遍。
3、use mysql
select password , host , user from user;
update user set host ='%' where user= 'root';
flush privileges;---刷新权限
这样其他机器就可以访问mysql了