【问题标题】:Drupal Migration Database ErrorDrupal 迁移数据库错误
【发布时间】:2015-12-08 13:30:14
【问题描述】:

我有一个 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).

我是否需要更改我创建的数据库或 settings.php 文件中的主机信息?因为我还没有改变任何东西?

【问题讨论】:

  • 似乎您的服务器无法解析数据库服务器名称:拼写正确吗?

标签: php mysql database drupal


【解决方案1】:

仔细检查settings.php 的正确性,尤其是主机名

【讨论】:

    猜你喜欢
    • 2015-06-08
    • 2015-04-06
    • 2018-10-21
    • 2014-05-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-24
    相关资源
    最近更新 更多