MySQL connection fails with one database and not the other
There was an extra entry in mysql.user table with host as '' that was interfering. Deleted it manually and running FLUSH PRIVILEGES worked for me.