The ProblemI ran into the following problem today when I was setting up a fresh local wordpress install on my Mac.
"Error establishing a database connection
This either means that the username and password information in your wp-config.php file..."
Fortunately, the fix was pretty simple!
The FixFirst, check if MySQL is running:
In terminal, I typed
If the server is running, the above command should return something like:
So the server is running, and I'm 100% sure I have the right username and password. So, what's the problem?
On a whim, I found the fix:
In /<wordpress folder>/wp-config.php, change the line
That fixed the problem! :)