A great way to waste time is to first try to upgrade Wamp’s PHP version, then Apache, and to fail in it, so then it’s time to go "full retard" against Wamp… eventually realizing it needs to be uninstalled. Then installed. Then it’s of course time configure Wamp again only to find out there’s an exotic error message, as seen in the title of this post. But how to fix it? In my case the error occurred because in phpMyAdmin my previously existing user account for the specific MySQL database was missing. If you’re having a similar problem, I suggest opening phpMyAdmin and going to the "Users" tab to see if there’s everything that your software/script requires.
No connection could be made because the target machine actively refused it.