我要讓連接到我的在線數據庫,但後來我得到這個錯誤:我想連接我的:在線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
你是否遠程連接?如果是,請檢查是否啓用了遠程連接。 –