127.0.0.1 vs localhost
- Not sure if this is the case here, but there are situations where connections look for a "computer on a domain" which implies that there is a dot in the computername.
- In you case, this might be a solution or a problem: if your computer name has a dot in it, try using this name.
Note that if you intend your app and mysql to be ALWAYS on the same machine, 127.0.0.1 is not a bad choice
Note2: you might edit / create your LMHOSTS file on the server so that you can create an entry like local.host to be another alias to 127.0.0.1... but I think this should be avoided... if the file is deleted or the app moved, it will mysteriously stop working.