[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: PHP Warning: mysql_connect(): Access denied for user 'root'@'localhost'



Am Friday 22 December 2006 10:38 schrieb Uwe Kerstan:
> * Thomas Winter <thowinter@googlemail.com> [22-12-2006 10:27]:
> > Am Friday 22 December 2006 10:18 schrieb Uwe Kerstan:
> > > * Thomas Winter <thowinter@googlemail.com> [22-12-2006 10:02]:
> > > > Starte ich ein PHP Script mysql_connect($this->Host, $this->User,
> > > > $this->Password) geht es nicht und es kommt diese Meldung obwohl user
> > > > nicht root ist.
> > >
> > > Du solltest mal $this->User debuggen und schauen, was da drin steht.
> >
> > Da steht das richtige drin.
> >
> > Und dann wird aus User/passwird das hier
> > 061222 10:19:22      15 Connect     Access denied for user
> > 'root'@'localhost' (using password: NO)
>
> Beim Passwort scheint aber nichts drin zu sein. :-)
>
> Ich würde zum debuggen erstmal alles hardcodieren:
>
> if (!$conn = mysql_connect('localhost','root','mypassword')){
>   print "<h1>Es konnte keine Verbindung zu MySQL hergestellt
> werden</h1>\n"; exit;
> }
>
> Gruss Uwe
if ( 0 == $this->Link_ID ) {

print $this->Host . $this->User . $this->Password;

	$this->Link_ID=mysql_connect($this->Host, $this->User, $this->Password);
	if (!$this->Link_ID) {
		$this->halt("Link-ID == false, connect failed");

Das habe ich, da ist alles richtig, trotzdem gibt mir mySQL
061222 11:26:24      20 Connect     Access denied for user 'root'@'localhost' 
(using password: NO)

das  im Logfile aus

Ebenso PHP im Apache Log
PHP Warning:  mysql_connect(): Access denied for user 'root'@'localhost' 
(using password:
 NO) in /var/www/tm/asterisk_cis/tmasteriskfunction_mysql.php on line 37

Ich bin wirklich ratlos.







Reply to: