Mysql无法建立连接,因为目标计算机主动拒绝了它

编程入门 行业动态 更新时间:2024-10-28 21:14:33
本文介绍了Mysql无法建立连接,因为目标计算机主动拒绝了它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我知道已经有很多人问过这个问题,但是这些人大多忘记了被防火墙阻止的密码,而我在这种情况下都没有.

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无法建立连接,因为目标计算机主动拒绝了它

本文发布于:2023-10-23 20:07:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1521882.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:主动   目标   计算机   拒绝了   Mysql

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!