Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Apr 2012
    Thanked 0 Times in 0 Posts

    MySQL Error Help!

    This is there error I'm getting:

    Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'dbo421149482'@'' (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)

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

  2. #2
    Super Moderator guelphdad's Avatar
    Join Date
    Mar 2006
    St. Catharines, Ontario Canada
    Thanked 156 Times in 147 Posts
    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts