无法连接到您的数据库服务器
Failed to connect to your database server
我不明白哪里出了问题。好像所有的数据都是正确的。
Resolve all issues below to continue the installation. For help configuring your database server, see the installation handbook, or contact your hosting provider.
- Failed to connect to your database server. The server reports the following message: SQLSTATE[HY000] [2002] No such file or directory.
> - Is the database server running?
- Does the database exist or does the database user have sufficient privileges to create the database?
- Have you entered the correct database name?
- Have you entered the correct username and password?
- Have you entered the correct database hostname and port number?
I take data from the ".env" file (DB_NAME=... DB_USER=... DB_PASSWORD=...)
据我所知,Drupal 默认不使用 .env 文件。相反,您必须将 default.settings.php
复制到 web/sites/default 目录下的 settings.php
。
你有一个 $database
数组,你可以在其中提供上述信息。或者您只需按上述要求创建 settings.php 文件并获得所需权限,然后只需在安装向导中输入您的数据库凭据(您的屏幕截图)。 Drupal 将自动更新 settings.php 文件。
安装完成后,您可以向settings.php提供444个权限位以确保安全。
我不明白哪里出了问题。好像所有的数据都是正确的。
Resolve all issues below to continue the installation. For help configuring your database server, see the installation handbook, or contact your hosting provider.
- Failed to connect to your database server. The server reports the following message: SQLSTATE[HY000] [2002] No such file or directory. > - Is the database server running?
- Does the database exist or does the database user have sufficient privileges to create the database?
- Have you entered the correct database name?
- Have you entered the correct username and password?
- Have you entered the correct database hostname and port number?
I take data from the ".env" file (DB_NAME=... DB_USER=... DB_PASSWORD=...)
据我所知,Drupal 默认不使用 .env 文件。相反,您必须将 default.settings.php
复制到 web/sites/default 目录下的 settings.php
。
你有一个 $database
数组,你可以在其中提供上述信息。或者您只需按上述要求创建 settings.php 文件并获得所需权限,然后只需在安装向导中输入您的数据库凭据(您的屏幕截图)。 Drupal 将自动更新 settings.php 文件。
安装完成后,您可以向settings.php提供444个权限位以确保安全。