阿里云vps连接数据库出错提示Unable to connect to any of the specifiled MySQL hosts
平常给客户做一些软件有需要连接数据库的时候,经常遇到连接数据库提示Unable to connect to any of the specifiled MySQL hosts。这个是因为没有在安全组上设置3306端口放行,只是在宝塔上设置3306放行是不够的。
首先登陆阿里云账号 添加安全组 设置
然后是宝塔上设置
然后就可以连接上了
平常给客户做一些软件有需要连接数据库的时候,经常遇到连接数据库提示Unable to connect to any of the specifiled MySQL hosts。这个是因为没有在安全组上设置3306端口放行,只是在宝塔上设置3306放行是不够的。
首先登陆阿里云账号 添加安全组 设置
然后是宝塔上设置
然后就可以连接上了