应使用哪个数据库主机条目在 WAMP 服务器上安装 Drupal?

应使用哪个数据库主机条目在 WAMP 服务器上安装 Drupal?

我正在运行 WAMP 的 Windows Server 2012 上安装 Drupal 7。Apache 正在监听端口 99。我将 defaul.settings.php 复制到 settings.php 并开始安装过程。

当我进入数据库页面时,我在数据库主机中输入以下内容:

wamp/bin/apache/Apache2.4.4/bin/php.ini

我还提供了正确的 MySQL 凭据,创建了一个空的 Drupal 数据库并验证 MySQL 正在运行。

我收到错误:

Warning: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: No such host 
is known. in DatabaseConnection->__construct() (line 304 of 
C:\wamp\www\Drupal\includes\database\database.inc).
In order for Drupal to work, and to continue with the installation process, you must    
resolve all issues reported below. For more help with configuring your database server, 
see the installation handbook. If you are unsure what any of this means you should 
probably contact your hosting provider.

Failed to connect to your database server. The server reports the following message:   
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: No such host is 
known. .

必须做什么才能使安装与我的数据库对话?

答案1

为什么要输入 php 配置文件的路径作为数据库主机?您在同一台服务器上运行 MySQL,对吗?然后输入本地主机或者127.0.0.1

相关内容