I had the same issue before and it was due to the # (hash) in the password. Not sure this is a bug or by design.
So, uninstalled and reinstalled mysql server with a root password that doesn't contain # (hash) and this time it worked fine.

Ubuntu 11.04 code named natty narwhal is released download ubuntu 11.04
Read ubuntu 11.10 reviews and share yours now!!