我有一个Drupal网站源代码目录和当前Drupal网站的SQL文件。我已经为该服务器使用PHPMyAdmin设置了一个空白网站(我们有自己的服务器)和新数据库。我已将SQL文件添加到数据库和更新的站点>默认> settings.php,带有新的用户名,密码和数据库名称。
但是,在尝试加载网站时出现错误:
Warning: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: No such host is known. in DatabaseConnection->__construct() (line 307 of D:\wwwroot\xxxxxxx\includes\database\database.inc).
Warning: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: No such host is known. in DatabaseConnection->__construct() (line 307 of D:\wwwroot\xxxxxxx\includes\database\database.inc).
Warning: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: No such host is known. in DatabaseConnection->__construct() (line 307 of D:\wwwroot\xxxxxxx\includes\database\database.inc).
Warning: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: No such host is known. in DatabaseConnection->__construct() (line 307 of D:\wwwroot\xxxxxxx\includes\database\database.inc).
PDOException: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: No such host is known. in lock_may_be_available() (line 167 of D:\wwwroot\xxxxxxx\includes\lock.inc).
Warning: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: No such host is known. in DatabaseConnection->__construct() (line 307 of D:\wwwroot\xxxxxxx\includes\database\database.inc).
我是否需要在我创建的db或settings.php文件中更改主机信息?因为我还没有改变什么呢?
答案 0 :(得分:0)
仔细检查settings.php
是否正确,尤其是主机名