项目中经常会有需要打开mysql的远程连接权限,如果你用的是root,允许以下两条语句即可
update user set Host='%' where User='root'; flush privileges;