Thursday, May 23, 2013

Fuel\Core\Database_Exception [ 1045 ]: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: YES)


Fuel\Core\Database_Exception [ 1045 ]: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: YES)

COREPATH/classes/database/pdo/connection.php @ line 94

89            $this->_connection = new \PDO($dsn$username$password$attrs);
90        }
91        catch (\PDOException $e)
92        {
93            $error_code is_numeric($e->getCode()) ? $e->getCode() : 0;
94            throw new \Database_Exception($e->getMessage(), $error_code$e);
95        }
96
97        if ( ! empty($this->_config['charset']))
98        {
99            // Set Charset for SQL Server connection


Please suggest why i am getting this error

2 comments:

  1. Please check in which environment you are running.

    If it is development mode. Than go to fuel\app\config\development\db.php and set your database configuration.

    return array(
    'default' => array(
    'connection' => array(
    'dsn' => 'mysql:host=localhost;dbname=fuelin',
    'username' => 'root',
    'password' => '',
    ),
    ),
    );


    ReplyDelete
    Replies
    1. Hi,

      It is 2016. I have had this store locator script running for years and today I get the same above error code on line 94 that display "1045" in my site. I am not very html trained but I have knowledge to navigate the WHM if you can give me steps to correct?

      Delete