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.
There are two database engines - MySQL DB and Maria DB. In your system, the database engine which is working may not over the default port. So check the active database engine and its port. Connect the database using:
mysqli_connect(host, username, password, dbname, port, socket)
for example:
mysqli_connect("localhost", "username", "password", "dbname", "3307")
The port number is available in the my.ini
file or in the status menu of wampserver.