I am trying to access a database which is in root@localhost from a website hosted by godaddy.
i created a php file in the project folder and trying to access the local mysql database
here is the code
//actionpage.php
<?php
$db=mysqli_connect("127.0.0.1","cancan","canpass","test");
if (!$db) {
die("Connection failed: " . mysqli_connect_error());
}
echo "Connected successfully";
?>
it gives me the error on the browser
Connection failed: Access denied for user 'cancan'@'localhost' (using password: YES)
The website i created is just static html without a back end..
I am pretty new to back end developing , Please help me