Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error establishing database connection #7

Open
brashrebel opened this issue May 23, 2017 · 5 comments
Open

Error establishing database connection #7

brashrebel opened this issue May 23, 2017 · 5 comments

Comments

@brashrebel
Copy link

I've run this script on a couple locally installed test sites. One I created using Local by Flywheel and the other using DesktopServer. The latter worked correctly but the former (Local) always returns:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>Database Error</title>

</head>
<body>
	<h1>Error establishing a database connection</h1>
</body>
</html>

Any ideas?

@jaessi
Copy link

jaessi commented Jul 18, 2017

For me, the solution was to edit wp-config.php, changing the DB_HOST setting from localhost to 127.0.0.1

@rahul286
Copy link
Member

@jaessi are you running mysql inside docker container?

@jaessi
Copy link

jaessi commented Jul 19, 2017

@rahul286 No, I'm just running MAMP normally.

@gmatta01
Copy link

@brashrebel Old thread but giving a shot. Did you find solution for using it with Local?

@brashrebel
Copy link
Author

@Gangesh honestly, I cannot remember. I know Local has changed a lot since so there's a good chance this issue is no longer valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants