我知道已经有很多人问过这个问题,但是这些人大多忘记了被防火墙阻止的密码,而我在这种情况下都没有.
I know there are many people already asked this , but this people mostly forgot password of blocked by firewall which I have none of this situations .
我正在使用php开发,并且我需要连接到远程数据库以使我的所有团队都可以使用它.
I am developing with php , and I need to connect to remote database to let all my team work on it .
localhost正常,但是当我尝试切换时,它给了我这个错误
localhost was just going fine , but when I tried to switch it gave me this error
由于目标机器处于活动状态,因此无法建立连接 拒绝了.
No connection could be made because the target machine actively refused it.
这是我要连接到.nf.biz数据库的代码:
and this is my code where I want to connect to .nf.biz database :
$db=mysqli_connect($host,$user,$password,$db_name,3306);推荐答案
嗯,这可能要晚了,但对于将来的访问者来说,
Well this might be late but for future visitors,
我当时发现 biz.nf 拒绝从外部来源与其数据库的任何连接,这意味着仅在 biz.nf 有权访问其数据库,但您将被拒绝.
I found out back then that biz.nf refuses any connections to it's DB from outside source which means that only the web-apps hosted on biz.nf have the access to their DB other than that you will get rejected.
更多推荐
Mysql无法建立连接,因为目标计算机主动拒绝了它
发布评论