Kenshin Posted June 10, 2003 Share Posted June 10, 2003 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? Quote Link to comment Share on other sites More sharing options...
effigy Posted June 11, 2003 Share Posted June 11, 2003 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. Quote Link to comment Share on other sites More sharing options...
Blu_Smurf Posted June 11, 2003 Share Posted June 11, 2003 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 Quote Link to comment Share on other sites More sharing options...
mixmaster Posted June 29, 2003 Share Posted June 29, 2003 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.