When trying to connect to my mySQL Databse for my website it seems to be returning a error_log that says that my access is denied when I have already setup permissions for my user to have full access to the database (seen below)

I am pretty sure I have everything setup but here is the error message i am receiving. Here is my code also, and apparently I need to change the security of a password_hash for my php? I am just slightly unsure where to put it, but here is all of my code.
database.php
<?php
session_start();
$server="beastfox.com";
$user="beaskxxb_beaskxxb";
$password="-";
$database= "beaskxxb_database";
$db = mysqli_connect($server, $user, $password, $database);
?>
my index.php
<?php
include("database.php");
session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$username = mysqli_real_escape_string($db,$_POST['username']);
$password = mysqli_real_escape_string($db,$_POST['password']);
$sql = "SELECT id FROM admin WHERE username = '$username' and password = '$password'";
$result = mysqli_query($db,$sql);
$row = mysqli_fetch_array($result,MYSQLI_ASSOC);
$active = $row['active'];
$count = mysqli_num_rows($result);
if($count == 1) {
session_register("username");
$_SESSION['login_user'] = $username;
header("location: myaccount.php");
}else {
$error = "Your Login Name or Password is invalid";
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Login</title>
<link rel="apple-touch-icon" sizes="57x57" href="favicon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="favicon/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="favicon/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="favicon/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="favicon/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="favicon/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="favicon/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="favicon/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="favicon/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="favicon/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="favicon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
<link rel="manifest" href="favicon/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="favicon/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="main.css">
<link href="https://fonts.googleapis.com/css?family=Raleway:100" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Condensed" rel="stylesheet">
</head>
<body>
<div class="LoginBox" style="">
<div class="element_wrapper">
<a class="Login">Login</a>
<class>
<center>
<form action = "" method = "post">
<input type = "text" name = "username" class = "username" value="Username"/><br /><br />
<input type = "password" name = "password" class = "password" value="Password" /><br/><br />
<input type = "submit" value = " Submit " class="btn"/><br />
</form></center>
</class>
</div>
</div>
</body>
</html>
the error I keep getting
[19-Jun-2017 21:43:37 America/New_York] PHP Warning: mysqli_connect(): (28000/1045): Access denied for user 'beaskxxb_beaskxxb'@'server228-5.web-hosting.com' (using password: YES) in /home/beaskxxb/public_html/database.php on line 10
[19-Jun-2017 21:43:37 America/New_York] PHP Notice: A session had already been started - ignoring session_start() in /home/beaskxxb/public_html/index.php on line 3
[19-Jun-2017 21:43:37 America/New_York] PHP Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli, boolean given in /home/beaskxxb/public_html/index.php on line 7
[19-Jun-2017 21:43:37 America/New_York] PHP Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli, boolean given in /home/beaskxxb/public_html/index.php on line 8
[19-Jun-2017 21:43:37 America/New_York] PHP Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in /home/beaskxxb/public_html/index.php on line 11
[19-Jun-2017 21:43:37 America/New_York] PHP Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in /home/beaskxxb/public_html/index.php on line 12
[19-Jun-2017 21:43:37 America/New_York] PHP Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in /home/beaskxxb/public_html/index.php on line 15
[20-Jun-2017 00:37:19 America/New_York] PHP Warning: mysqli_connect(): (28000/1045): Access denied for user 'beaskxxb_beaskxxb'@'server228-5.web-hosting.com' (using password: YES) in /home/beaskxxb/public_html/database.php on line 10
[20-Jun-2017 00:37:19 America/New_York] PHP Notice: A session had already been started - ignoring session_start() in /home/beaskxxb/public_html/index.php on line 3
I have written a message about my php before but i still seem to be getting errors, if you know anything. Thanks,
I know you probably no whats wrong! Im sorry im not that advanced. Your's most apologetically if it causes any inconveniences, David | BeastFox