Hallo liebe Community,
ich hab vor einiger Zeit eine E-Mail bekommen von bplaced, dass irgendwas mit den Servern passiert ist.
Seit dem hab ich jetzt ein Problem mit meiner Datenbank / PHP Datei.
<?php
error_reporting(E_ALL);
$connection = mysqli_connect('localhost', 'user(****)', 'password(****)', 'dbname(****)');
//Check to see if we can connect to the server
if(!$connection)
{
die("Database server connection failed.");
}
else
{
mysqli_set_charset($connection, "utf8");
$query = "SELECT * FROM Locations";
$resultset = mysqli_query($connection, $query);
if(!$resultset) {
die(mysqli_error());
}
$records = array();
//Loop through all our records and add them to our array
while($r = mysqli_fetch_assoc($resultset))
{
$records[] = $r;
}
//Output the data as JSON
//var_dump($records);
echo(json_encode($records));
}
?>
Hier ist mein Code und dass ist meine Fehlermeldung die ich bekomm:
Warning: mysqli_connect() [function.mysqli-connect]: (HY000/1045): Access denied for user ‘skatebook’@‘localhost’ (using password: YES) in /users/skatebook/www/locations.php on line 10
Ich weiß aber nicht wie ich das Problem lösen kann; weil ich benutz diese Datei um meine App mit Daten zu füllen. Hoffe mir kann jemand helfen!