Fatal error: Uncaught PDOException: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it. in C:\xampp\htdocs\oop.php:16 Stack trace: #0 C:\xampp\htdocs\oop.php(16): PDO->__construct('mysql:host=loca...', 'root', '', Array) #1 C:\xampp\htdocs\explain.php(58): B2B->__construct() #2 {main} thrown in C:\xampp\htdocs\oop.php on line 16