I have this problem when I am trying to run my PHP MySQL script. When I try to run my .php file this is what I get.
mysql_connect(): No connection could be m
This error is NOT password related.
Password related errors display a response from MySQL server. The subject response is NOT coming from MySQL server, but from the client itself. It could not connect to the server because the MACHINE (not the server) refused it, so, it was more likely to be a network issue or some other thing.
Try connecting to 127.0.0.1. Also check the port you are connecting to and which port is mysql running. Check for firewalls blocking connections. Are you sure is MySQL Server running?
This answer may have additional info: PHP -MySQL:No connection could be made