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
I had the same problem. The issue was that MySql was not running on Xampp so I had to run it for everything to work.
So kindly ensure MySql is running on your localhost. Go to Xampp [or other localhost] control panel and click start/run under Mysql ].