Jump to content

DB Connect Error 2005 before installation


onjegolders
 Share

Recommended Posts

Hi Guys, Have set up a new server and I'm having an issue with setting up a blank pw installation.

I have also moved an existing PW installation to this server and had issues but since adding mysqli support, this existing site now works fine.

However, when I downloaded a fresh install of PW and uploaded that, expecting the installation screen, I get the following error:

Error: Exception: DB connect error 2005 - Unknown MySQL server host 'Config' (1) (in /home/networkd/public_html/wire/core/ProcessWire.php line 96)

This error message was shown because Superuser has never logged in. Error has been logged.

I've seen other threads on here about possible causes of this in the config file but seeing as this is pre-installation, I'm not sure what can be causing it?

Any ideas?

Link to comment
Share on other sites

However, when I downloaded a fresh install of PW and uploaded that, expecting the installation screen, I get the following error:
Error: Exception: DB connect error 2005 - Unknown MySQL server host 'Config' (1) (in /home/networkd/public_html/wire/core/ProcessWire.php line 96)

You saw this when first starting the installer, or after completing the database config screen?

Link to comment
Share on other sites

You saw this when first starting the installer, or after completing the database config screen?

Hi Ryan, I didn't even get to the install page. I uploaded files and created a clean database, loaded up the root page expecting the installer and got this message.

Link to comment
Share on other sites

Hi Ryan, I didn't even get to the install page. I uploaded files and created a clean database, loaded up the root page expecting the installer and got this message.

A few things to check:

  • Check if there is a /site/assets/installed.php file. If there is, delete it. That file would only be present if your installation was copied from another, rather than from a fresh GitHub/zip file. 
  • Double check that there is an /install.php file present. 
  • If you still get an error, try accessing /install.php directly from your browser.
  • Like 1
Link to comment
Share on other sites

  • 1 month later...

I was trying to use Module Manager but got a permission error about  ModuleMaanager.cache, then changed to it to 777 but got the same error, the I tried to delete that file and create a new one with the same name (me idiot) now I get the same error as you:

Error: Exception: DB connect error 2005 - Unknown MySQL server host 'Config' (1) (in ...../wire/core/ProcessWire.php line 96).

I've got a fresh copy so no worries, just wrote it here in case it helps. maybe is all about ModuleMaanager.cache permissions when you upload it to your server.

Link to comment
Share on other sites

I was trying to use Module Manager but got a permission error about  ModuleMaanager.cache, then changed to it to 777 but got the same error, the I tried to delete that file and create a new one with the same name (me idiot) now I get the same error as you:

Error: Exception: DB connect error 2005 - Unknown MySQL server host 'Config' (1) (in ...../wire/core/ProcessWire.php line 96).

I've got a fresh copy so no worries, just wrote it here in case it helps. maybe is all about ModuleMaanager.cache permissions when you upload it to your server.

ModulesManager creates the cache file and it's no problem to delete that file, as it will create a new one anyway. The cache file has nothing to do with the rest of ProcessWire and certainly nothing with PW's DB connection... it's just there's so it doesn't need to load the json feed everytime you open ModulesManager.

Link to comment
Share on other sites

Hello Soma.

  

    That's what I thought, but when I removed the file, the website stopped working, the reason was because the permissions for the cache directory wasn't set properly so pw couldn't write a new file.

    Thanks for your help it gave me the power to double check the problem, now is working.

Link to comment
Share on other sites

Glad you got it working.

But what? :) Sorry, but there's no way, that if you remove the ModulesManager.cache that the website stops working. It's not possible :) ModulesManager is only active if you open it in Admin, and when I remove write permission from cache folder and open ModulesManager in Admin I get this error from the module:

TemplateFile: cannot create cache file /.../site/assets/cache/ModuleManager.cache

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...