I tend to think that this could be some special characters used in either the username or password field. To check if your DB account info is correct, open the following file for editing and fix accordingly:
During installation, the db username and passwod are stored as _POST variables, which explains why it would work, but when stored
in a file, strings could have been altered. To avoid the problem, please try to use normal characters for dbname, dbuser and
No, this is due to the fact that the MySQL client libraries automatically connect through UNIX sockets if the hostname is localhost. I'm not sure if this same behaviour happens if you connect to one of your box's real IPs - try that first. Failing that, I believe there's a my.cnf variable you can change that will adjust how the client reacts to this.