"Temporary failure in name resolution"

I have installed YOURLS on my site hosted with InfinityFree. When I try to go to the admin page, it just gives the error: Incorrect DB config, or could not connect to DB
PDOException: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution

I have asked on the YOURLS forums and they said this is a problem of InfinityFree. How do I fix this?

You are violating TOS. No url shortener allowed

What?

I don’t see anything on the faq saying “url shorteners are not allowed”

See this…

4 Likes

That’s not entirely true. YOURLS, by default, does not come with a public interface. If you only access the admin panel yourself and only create your own links, I don’t see any problems.

I would guess that’s an issue with the database hostname. Did you copy it as-is from the control panel or client area?

4 Likes

@Admin It’s the same on both the config.php, the cpanel and the client area.

That’s what this person yesterday thought too:

Again: did you copy it as-is from the control panel or client area? Typing things by hand is dangerous.

Although, there seem to be a lot of people reporting similar errors, so it might be a platform issue too.

1 Like

When you copy paste the name of the DB directly from the CPanel, it adds a space at the end of the name. Make sure there isn’t a space.

2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.