I don't know if this is what's happening to you, but I changed "localhost" to "127.0.0.1" and it worked for me. There was a bug a while back where localhost wasn't routing properly.
If you're logging in with code change:
$db = mysql_connect("localhost:8888", "user", "pass");
$db = mysql_connect("127.0.0.1:8888", "user", "pass");
If you're logging in through the browser, you'll have to go into the config file and change the defaults in there. For the life of me I can't remember what the file was. I use MAMP Lite, so basically all this is done automatically for me...If that doesn't work maybe we can figure something else. It could actually be a number of things