Error establishing a database connection. This either means that the username and password information in your `wp-config.php` file is incorrect or we can’t contact the database server at `localhost`

Can anyone help with this? I can not get in whatsoever!


Error establishing a database connection

This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost . This could mean your host’s database server is down.

  • Are you sure you have the correct username and password?
  • Are you sure that you have typed the correct hostname?
  • Are you sure that the database server is running?

If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

Hey Sarah!

I apologize for the delay here. And I’m very sorry for the trouble!

Can you please check the logs folder for the sites you’re having trouble with? There may be some clues in either the PHP or MySQL error logs.

Here’s how to check the logs: https://local.getflywheel.com/community/t/how-do-i-retrieve-locals-log-file/3720

Also, feel free to zip up the logs folder and provide the zip here.

1 Like

KT local-by-flywheel.log.zip (10.7 KB)

Hey @reelsassy

I’m seeing a few different errors in the Local log. Most of them seem like they are related to issues with MySQL, and look like this:

Apr 6, 2019, 8:56 PM EDT - warn: [main/SiteModel] wpInstalled not returning "installed" 
{ message: '',
  stack:
   'Error\n    at /private/var/folders/kh/hlrznphs2wn9_sj505l3yc6h0000gn/T/AppTranslocation/3F5EB02F-06F6-499C-BDC4-6EA05FE3FBB4/d/Local by Flywheel.app/Contents/Resources/app.asar/main/actions-sites/wait-for-mysql.js:1:2853\n    at Generator.next (<anonymous>)\n    at _0x5bab70 (/private/var/folders/kh/hlrznphs2wn9_sj505l3yc6h0000gn/T/AppTranslocation/3F5EB02F-06F6-499C-BDC4-6EA05FE3FBB4/d/Local by Flywheel.app/Contents/Resources/app.asar/main/actions-sites/wait-for-mysql.js:1:1645)\n    at /private/var/folders/kh/hlrznphs2wn9_sj505l3yc6h0000gn/T/AppTranslocation/3F5EB02F-06F6-499C-BDC4-6EA05FE3FBB4/d/Local by Flywheel.app/Contents/Resources/app.asar/main/actions-sites/wait-for-mysql.js:1:1904\n    at process._tickCallback (internal/process/next_tick.js:68:7)' }

Can you let us know a little more backstory about this issue?

  • When did the site stop working?
  • How was this site created? Was it a newly imported site, or did it stop working after some sort of event?
  • Since this seems related to MySQL, can you zip up and attach the logs folder for the site that is having issues?
  • Are you able to create and access a new, plain WordPress site?
  • Can you zip up the site folder and import it into a new Local site? More detailed steps can be followed in the Restoring From Only Site Files section of this help doc.

Let me know a little more about what is going on and we can give some more direction on what needs to be done!

– Ben

Hello! How did this user’s problem get resolved? I ask becuase I am encoutnering the same thing. I am able to log straight in to WP, but I can not access my Local by FlyWheel site that is in development.

BTW, The site worked fine, until I added a user.

1 Like

Hey @cneutra

Can you clarify a little more about what the issue is?

  • Are you able to log in to the WP Admin of the Local site, but are unable to access the front end of the Local site?
  • Can you please provide your local-by-flywheel.log file?
  • Can you provide a zip of the logs folder for the site?
  • Also, if you have any screenshots of what you are seeing, that can be helpful in figuring out.

Please get back to us with that info and we should have more direction to go from there!

– Ben

Hi Ben i have the same issue, can you help me please?logs.zip (2.7 MB)

friend it seems ok now thanyou i was afraid haha, is now ok the issue!

1 Like