Jump to content

Archived

This topic is now archived and is closed to further replies.

Kenshin

Connect Problems

Recommended Posts

This comes up when I try to view my forums

 

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

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);

}

}

}

}

Any ideas?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.