It had been a while since I last had to install XAMPP from scratch, create my databases, and reconnect my CodeIgniter apps to my DB On my local Windows machine. So when I set everything up, I was surprised when I could no longer connect to my database.
The issue turned out to be a relatively simple solution. When creating the database, using phpMyAdmin, I had created the database with the default “Any host”:
What the connection requires is for the Host be changed to localhost (If you have already created the Database, this can be changed under the Privileges tab):
You can also get around this by leaving the user you created with the Host of Any host, and then create a second identical user that has Local as the Host (You would do this so both localhost and other computers can use your computer as the Database Server). A more detailed example of user creation for both localhost and %; go to this MySQL page: http://dev.mysql.com/doc/refman/5.0/en/adding-users.html
Thanks to the CodeIgnitor forums for helping me on this one :