What I am suggesting is that create a new a user and password for the database through phpMyAdmin. Then replace user and password in wp-config.php with the new one created.
I’ve tried this but I’ll give it another go. I can’t see how to include a picture of the definition so let me describe it – I used a userid of Newuser and a password of Newpassword I left the Anyhost field with the % character in it and I left the tick in the field “Grant all privileges on database “southamlocal”” and “Global Privileges” had a tick in it. The result was
User Host Type Privileges Grant Action
Newuser % global ALL PRIVILEGES Yes Edit Privileges
database-specific ALL PRIVILEGES No Edit Privileges
I don’t know why Grant was set to “No” in the database-specific line – I have tried changing this to “Yes” but although the change was accepted the “Yes” value made no difference to the problem’ and I still end up with “Error Establishing Database Connection” when trying to access the web site even though phpMyAdmin assures me that Newuser has access to the database “southamlocal”. I’m stumped!
i am trying to install wordpress 4.2.2 on xampp by localhost.
but its need to mysql database username and password.
so how can i find these?
hi,
i used WordPress 4.2.2 on localhost.i want to use landing page plugins 2.0.3 but its not working.
what can i use it?
thanks
jhvidyut, I’m not sure what your comments have to do with the problem in the initial post. Would you mind opening your own thread please and not attaching your problem to this post – thank you.You will stand a better chance of getting a relevant answer.
@bernard46 –
Just tried this on my local Windows MAMP and yep, as you are experiencing, get the DB connection error.
What fixed it? Use local instead of the %
Additionally, as you may or may not be aware, the user name and password are case-sensitive. Verified by changing Newuser to newuser; connection error 🙂
Cheers!
Lyle
Well blow me down! Brilliant, you’re dead right.
Can I just ask one more question – what does the % sign mean in the Host field when one first gets to the Add new user screen. I had wrongly assumed that since I had anyhost and the % sign was filled in it would be OK, but obviously not.
Thanks for your help.
Glad it worked but I really can’t answer why … perhaps take a look at the phpMyAdmin docs 🙂