Unknown MySQL server host '' (2) [2005] error.

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Anti-Spam Guide
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: phpBB 3.1.x is at its End of Life stage and support will NOT be provided after July 1st, 2018.
Locked
Buddyz
Registered User
Posts: 7
Joined: Wed Jun 03, 2015 11:33 am

Unknown MySQL server host '' (2) [2005] error.

Post by Buddyz »

Hello everyone,

I'm trying to move a phpBB forum to a new host. (VPS, CPanel/WHM)
I've moved all the files and imported the database to a freshly created one. For this I used CPanel and PHPMyAdmin.

When I try to open the Forum, I get the following error though:
Image

The blurred out text is the name of the old "$dbhost=".
This is weird, because I have actually updated it in the config.php file:
Image
This new file has overwritten the old one. Still I get the error.

Suggestions are welcome.
Thank you very much in advance!

Kind regards,

Buddyz
User avatar
KevC
Support Team Member
Support Team Member
Posts: 70268
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Unknown MySQL server host '' (2) [2005] error.

Post by KevC »

That info is cached.

Open the board’s /cache folder on the server and delete everything except index.htm and .htaccess.
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"
Buddyz
Registered User
Posts: 7
Joined: Wed Jun 03, 2015 11:33 am

Re: Unknown MySQL server host '' (2) [2005] error.

Post by Buddyz »

Thank you very much for your prompt reply!
I thought it had something to do with cached/leftover files, but didn't know what to do.

But now I get the following error:
Image

Seems like a permission issue, am I correct?
Thanks again.
User avatar
KevC
Support Team Member
Support Team Member
Posts: 70268
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Unknown MySQL server host '' (2) [2005] error.

Post by KevC »

Yes the very last line is the important bit there.

The cache folder needs to be writeable.

phpBB3 Chmod Permissions
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"
Buddyz
Registered User
Posts: 7
Joined: Wed Jun 03, 2015 11:33 am

Re: Unknown MySQL server host '' (2) [2005] error.

Post by Buddyz »

Thanks, KevC. Everything is working exactly as it should now.

I'd like to thank you for your time and help. :)

Kind regards,

Buddyz
Greylock3491
Registered User
Posts: 34
Joined: Wed Jan 09, 2008 1:11 am

Re: Unknown MySQL server host '' (2) [2005] error.

Post by Greylock3491 »

Thanks for this answer - just ran into this myself and this post saved the day!
Locked

Return to “[3.1.x] Support Forum”