I'm trying to complete my final project for university and I'm having a lot of trouble connecting to a database. When I try to connect to the mysql database it's giving me the following error:
Access denied for user 'B00XXXXXX@localhost'@'SCMSERV2.scm.net' (using password: YES);
even though my password is correct.
I've trolled the interwebs looking for an answer, but everything I have tried has failed.
Here is the connection code I'm using
<?php //PHP 5 +
// database settings
$db_host = '193.xx.xxx.xxx';
$db_username = 'b00XXXXXX';
$db_password = 'XXXXXXXX';
$db_name = 'b00XXXXXX';
$mysqli=mysqli_connect($db_host,$db_username,$db_password);
if(!$mysqli) {
echo '<h1>Connected to MySQL</h1>';
//if connected then Select Database.
$db=mysqli_select_db("b00XXXXXX",$mysqli);
}
else {
echo '<h1>MySQL Server is not connected</h1>';
}
MySQL Server is not connected
' ; } ?> – NiamhSnow Apr 10 '16 at 16:27