Core: getaddrinfo failed: Name or service not known

Created on 10 Jan 2018  路  5Comments  路  Source: api-platform/core

When I run the following command, I get error messages:

bin/console doctrine:database:create

Here are the errors:

[Doctrine\DBAL\Exception\ConnectionException]
An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known

[Doctrine\DBAL\Driver\PDOException]
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known

[PDOException]
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known

[PDOException]
PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known

All 5 comments

Your database configuration must be wrong.

Thanks for the quick reply! Where do I look for the database configuration? I'm really new to this stuff. Thanks in advance!

As @soyuka stated above, I think my DB configuration is incorrect. I'm not sure where that information is stored. Can someone point me in the right direction? Thanks!

Check in app/config/parameters.yml.

That did it! Thank you so much!

Was this page helpful?
0 / 5 - 0 ratings