Thought some people might find it useful to see how I managed to solve this…
So, this week I determined to do a little more work on the code for this blog – a new plugin. However, as I have recently updated my laptop I needed to re-install all the tools – Eclipse, Ant, XAMPP – and setup the XAMPP test instances of the blog.
I ran up XAMPP and used phpMyAdmin to setup a test WordPress database and user. Then I used Eclipse to edit the wp-config.php file for the XAMPP installation and finally a little ANT script to rebuild the blog into the XAMPP directory.
At this point, I expected to launch immediately in to the blog at “http://localhost:8080/www.kajabity.com” ready to do the setup and install a backup from the live blog to play around with.
No such luck! Instead I got the following:
Well, I tried all the obvious things – checked the password, username, checked everything was up and running. Nothing obvious. I added and removed the user and database several times – but to no avail.
I tried Google – and found a few others with suggestions, but nothing that worked.
But, eventually, I noticed that the one detail was a little odd. When creating the users I had left the “Host” setting to be the default “Any host” – which results in the “Host” column in the Users list showing “%”.
So, I changed the user (using the Edit Privileges link) and set the Host to be “localhost” – using the “Create a new user with the same privileges and … delete the old one from the user tables.” option.
I’ve shown the user that worked (wordpress_user) and another one that causes the problem (badwp_user) in the screenshot below:
Hope that helps some of you.