简体   繁体   English

连接到我的数据库时出现以下错误

[英]I am getting following error while connecting to my database

I am getting following error while connecting to my database:连接到我的数据库时出现以下错误:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at admin@main-hosting.eu to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

php_error.log file: php_error.log 文件:

[25-Feb-2017 09:45:09 UTC] PHP Warning: mysqli_connect(): (HY000/2003): Can't connect to MySQL server on 'mysql.hostinger.in' (4 "Interrupted system call") in /home/u191892126/public_html/API/connect.php on line 8

My php file:我的php文件:

<?php
$servername = "mysql.hostinger.in";//var deceleration I tried "localhost" too
$username = "u1918921**_root";
$password = "*********";
$dbname = "u191892126_acare";

// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
    die("Connection failed: " . mysqli_connect_error());
}
?>

这是服务器的错误再次尝试(花了 4 小时),一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM