Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-26-2012, 04:08 PM   PM User | #1
JamesIsDusk
New Coder

 
Join Date: Apr 2012
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
JamesIsDusk is an unknown quantity at this point
MySQL Error Help!

This is there error I'm getting:



Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'dbo421149482'@'108.175.6.25' (using password: YES) in /homepages/28/d420971226/htdocs/inc/database.class.php on line 31
Unable to connect to database




My file code: (Or the part that matters)




[code]
if (!defined('SYSTEM_CLASS_PHP_INCLUDED')) {
require_once dirname(__FILE__) . '/system.class.php';
}

abstract class Database { }

class MySQL extends Database {
protected $lid = 0;
protected $qid = 0;
protected $affrows = 0;

public function __construct($host, $user, $pass, $db, $force = false) {
global $_LANG;

$this->lid = mysql_connect($host, $user, $pass, $force);

if (!$this->lid) {
$this->trigger_error('Unable to connect to database');
}

if (!mysql_select_db($db, $this->lid)) {
$this->trigger_error('Database not found');
}
}
[code]
JamesIsDusk is offline   Reply With Quote
Old 06-26-2012, 08:20 PM   PM User | #2
guelphdad
Super Moderator


 
guelphdad's Avatar
 
Join Date: Mar 2006
Location: St. Catharines, Ontario Canada
Posts: 2,629
Thanks: 4
Thanked 147 Times in 138 Posts
guelphdad will become famous soon enoughguelphdad will become famous soon enough
the PASSWORD YES means that mysql is receiving a password. (you would get PASSWORD NO error if the password was not being sent to mysql).

1) check that it is the correct password that is being sent

2) check that the user dbo421149482 has permission to connect to the database in question

3) are you using a shared server through a host? If so they almost never allow remote connection to the databases.
guelphdad is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:18 PM.


Advertisement
Log in to turn off these ads.