You may have had, or not had, the skip-networking line in your my.cnf. Depending on your setup on the new server, that would cause the issue you were experiencing, so when re-customizing your .cnf file watch for that line. This looked to be a connectivity issue rather than a username/password issue.