PHP Integrating PHP with Databases Querying the Database with PHP Querying the Database

Hi, I tried to run the project in my own environment but I can't past the second try-catch :(

Hi, I tried to run the project in my VSC studio but I can't past the second try-catch :( I downloaded the SQL file, set it in myAdmin, I see the tables with all files in, I'm conectet to the database but can't pass the second try-catch. <?php try { $db = new PDO("mysql:host=localhost;dbname=test;port=3306", "root", ""); $db->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION); } catch (Exception $e){ echo "Unable to connect"; echo $e->getMessage(); exit; } echo "Connected to the database"; try { $results = $db->query("SELECT title, category FROM Media"); echo "Retrieved Results"; } catch (Exception $e) { echo "Unable to retrieved results"; exit; } My result is: Connected to the databaseUnable to retrieved results