php getaddrinfo failure: “A non-recoverable error occurred during a database lookup.”

前端 未结 2 534
小蘑菇
小蘑菇 2021-01-25 02:40

Would really appreciate your help please :) I keep getting an error on my PDO connect, as such: Warning: PDO::__construct(): php_network_getaddresses: getaddrinfo failed

相关标签:
2条回答
  • 2021-01-25 03:01

    Define a name for your SQL server in the http config file, or try with IP address like 127.0.0.1

    And make sure database is running

    0 讨论(0)
  • 2021-01-25 03:15

    It's likely that the server that hosts your app doesn't know how to resolve "localhost".

    See the hosts file for this.

    You can workaround that by replacing "localhost" with "127.0.0.1"

    0 讨论(0)
提交回复
热议问题