我要让连接到我的在线数据库,但后来我得到这个错误:我想连接我的:在线MySQL数据库,但我得到这个错误。有人能帮我吗?
Warning: mysqli :: mysqli(): (HY000/2002): A connection attempt failed because the " Related party Incorrectly If the answer after a certain time , of the costs Connection failed because " the Confederate host has not responded . C: \ wamp \ www \ array Add in db \ 222.php on line 8
这是我的代码:
?php
$servername = "db.tapdeleest.nl"; $username = "***"; $password = "***"; $dbname = "***";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
else
{
echo "nice";
}
?>
感谢您的帮助!
对不起,我的意思是php。 – sander
您能否删除不喜欢的内容? – sander
你是否远程连接?如果是,请检查是否启用了远程连接。 –