Jump to content


Photo

Connect Problems


  • Please log in to reply
3 replies to this topic

#1 Kenshin

Kenshin
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 10 June 2003 - 12:24 AM

This comes up when I try to view my forums

[quote]Warning: mysql_connect() [function.mysql-connect]: Access denied for user: \'root@localhost\' (Using password: NO) in /home/divxnnz/public_html/phoenixdown/forums/admin/db_mysql.php3 on line 34

And this is the connection part of db_mysql.php3
[quote] function connect() {
global $usepconnect;
// connect to db server

if ( 0 == $this->link_id ) {
if ($this->password==\\\"\\\") {
if ($usepconnect==1) {
$this->link_id=mysql_pconnect($this->server,$this->user);
} else {
$this->link_id=mysql_connect($this->server,$this->user);
}
} else {
if ($usepconnect==1) {
$this->link_id=mysql_pconnect($this->server,$this->user,$this->password);
} else {
$this->link_id=mysql_connect($this->server,$this->user,$this->password);
}
}
if (!$this->link_id) {
$this->halt(\\\"Link-ID == false, connect failed\\\");
}
if ($this->database!=\\\"\\\") {
if(!mysql_select_db($this->database, $this->link_id)) {
$this->halt(\\\"cannot use database \\\".$this->database);
}
}
}
}

[/quote]
Any ideas?

#2 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 11 June 2003 - 04:53 AM

is this the line it executes?

if ($usepconnect==1) {
$this->link_id=mysql_pconnect($this->server,$this->user);
} else {
$this->link_id=mysql_connect($this->server,$this->user);
}


it needs a password, as does the pconnect.
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#3 Blu_Smurf

Blu_Smurf
  • Members
  • PipPipPip
  • Advanced Member
  • 32 posts
  • LocationTexas

Posted 11 June 2003 - 08:09 AM

Warning: mysql_connect() [function.mysql-connect]: Access denied for user: \'root@localhost\' (Using password: NO) in /home/divxnnz/public_html/phoenixdown/forums/admin/db_mysql.php3 on line 34

no, his problem is, invalid username/password.... hes getting access denied, not code errors

#4 mixmaster

mixmaster
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 29 June 2003 - 08:38 PM

I am getting the same prob. I cannot connect with root. i dont have pass set and I dont have any other user

is tehre a way to correct this?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users