I'm trying to connect to my database locally with php however I'm getting the error that the target machine is refusing it and it's pointing to line 8 of my php code
Below I posted the code along with the error
// I'm sure that I defined the credentials correctly //
<?php
/* Database credentials.*/
define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', 'ajay199ishere');
define('DB_NAME', 'oasis_water');
/* Attempt to connect to MySQL database */
$link = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);
// Check connection
if($link === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
?>