SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: No address associated with hostname

Permalink 1 user found helpful
Doing a new install and keep getting this error message.

I've tried using both MYSQL and SQL2012 as the backend and keep getting the same result.
Using Concrete 5.7.5.6

1 Attachment

 
cbeerens replied on at Permalink Reply
Anyone got a clue? Is it to do with the Database.php file?
mesuva replied on at Permalink Reply
mesuva
This looks like the webserver can't find the address of the database server you put in.

If the database is on the same machine, try putting in localhost.
Or you could try putting in the IP address of the database server instead.
cbeerens replied on at Permalink Reply 1 Attachment
It's on a different server.
I've seen another thread similar that states to edit the databases.php file, but mine looks completely different.
See attached.
mesuva replied on at Permalink Best Answer Reply
mesuva
The error message suggests that it can't do a DNS lookup for that hostname, hence why I suggested testing it with the IP address of that server instead.

But I've seen that error message show for other problems, like the wrong port number or credentials.

You'll need to use MySQL by the way, SQL2012 won't work.

Here's the same error with a different suggestion as to the fix:
https://www.concrete5.org/community/forums/5-7-discussion/also-concr...

It might be worth writing a quick test php script to just see if you can connect. If you can't connect that way, it's going to be more of a networking or MySQL config issue that you'd have to chase.
cbeerens replied on at Permalink Reply
Okay, I think I've sorted it now (well, it's installing). There was a missing DNS entry on the domain with Netregistry for mysql-2.netregistry.net.

Added it in and it's now behaving itself.

Thanks for your assistance.