1.mysql的设置
(1)授权
mysql>grant all privileges on *.* to 'root'@'%' identified by 'youpassword' with grant option;mysql>flush privileges;(2)修改/etc/mysql/my.conf找到bind-address = 127.0.0.1这一行改为bind-address = 0.0.0.0即可重启mysql
2.防火墙开放端口
服务器的防火墙,需要开启3306端口