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? Link to comment https://forums.phpfreaks.com/topic/566-connect-problems/ 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. Link to comment https://forums.phpfreaks.com/topic/566-connect-problems/#findComment-1923 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 Link to comment https://forums.phpfreaks.com/topic/566-connect-problems/#findComment-1926 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? Link to comment https://forums.phpfreaks.com/topic/566-connect-problems/#findComment-2171 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.