Bitte um hilfe ich erhalte diese Fehlermeldung:
Warning: mysql_connect(): Access denied for user 'root' localhost (using password: YES) in /var/customers/webs/ni157147_1/test2/includes/connect.inc.php on line 7 1045: Access denied for user 'root' localhost (using password: YES)
Wen ich versuche auf meiner Website ins Control Panel einzuloggen , woran liegt das Problem das es nicht connectet ?
[xxxxxx = Die eingegebenen Daten]
<?php
$hostname = 'xxxxxxx'; // Your MySQL hostname. Usualy named as 'localhost', so you're NOT necessary to change this even this script has already online on the internet.
$dbname = 'xxxxxxxx'; // Your database name.
$username = 'xxxxxxxx'; // Your database username.
$password = ' xxxxxxx'; // Your database password. If your database has no password, leave it empty.
mysql_connect($xxxxxxx, $xxxxxxxxxx, $xxxxxxx) or die(mysql_errno() . ": " . mysql_error() . "\n");
mysql_select_db($xxxxxxxxx) or die(mysql_errno() . ": " . mysql_error() . "\n");
$domainname = 'http://'.$_SERVER['HTTP_HOST'].'/pcp';
$webname = "Your name here";
// DO NOT TOUCH BELOW!
$sessid = $_COOKIE['sessionID'];
if(isset($_COOKIE['sessionID'])) {
$sesidq = "SELECT * FROM sessions WHERE SessID='$sessid'";
$sesid = mysql_query($sesidq) or die(mysql_errno() . ": " . mysql_error() . "\n");
$works = mysql_num_rows($sesid);
while ($row= mysql_fetch_array($sesid)) {
$userplayer = $row['Username'];
$pwdses = $row['Password'];
}
$check1 = "SELECT * FROM Accounts WHERE Name='$userplayer'";
$check2 = mysql_query($check1) or die(mysql_errno() . ": " . mysql_error() . "\n");;
while ($row= mysql_fetch_array($check2)) {
$pwdreal = $row['Password'];
}
if($works<1) {
$domain = $_SERVER['HTTP_HOST'];
setcookie('sessionID', $sessid, time()-60*60*24*365, '/', ".$domain");
header("Location: $domainname/pcp/login.php?sesexp");
}
if($pwdses!=$pwdreal) {
mysql_query("DELETE FROM sessions WHERE SessID='$sessid'");
header("Location: $domainname/pcp/login.php?sesexp");
}
}
?>