title: ERROR: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it
body: <p>An error suddenly occurred while I was debugging my code. 
  It has this series of errors regarding the connection to database.</p>
  
  <pre><code>ERROR: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.
  ( ! ) Fatal error: Uncaught exception 'PDOException' with message ' in C:\wamp\www\web\main\users.php on line 15
  ( ! ) PDOException: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it. in C:\wamp\www\web\main\users.php on line 15
  </code></pre>
  
  <p>this is the code of where the error is pointing</p>
  
  <pre><code>function __construct()
          {
              $this-&gt;con = new PDO("mysql:host=".$this-&gt;host.";dbname=".$this-&gt;db,$this-&gt;user,$this-&gt;pass);
          }
  </code></pre>
  
  <p>I don't know what to do since I do not usually get problems like this so I haven't studied much about WAMP. 
  Thank You for your help.</p>