[eluser]jedd[/eluser]
Well, I'm poop-outta ideas then.
Grasping-at-straws suggestions (absent useful access to any logfiles)
o disable persistent connections - there's occasionally weirdness with these on shared hosts
o change localhost to 127.0.0.1 - as mysql's db connect stuff will attempt to talk to a local socket as a first preference
Note that I really can't see either of those making didly squat difference in this instance, especially if you've got conventional code accessing the db just fine.
As you've no doubt discovered, the stuff you're feeding into CI is pretty much what you'd do manually. You could put some debug statements in the CI database library, just to echo out the credentials and make sure that just before it tries to connect, it's using the same credentials you think it's using.