Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
1045!
  • Fuel\Core\Database_Exception [ 1045 ]: SQLSTATE[HY000] [1045] Access denied for user 'pitdemo'@'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


    has someone encountered this and has a solution?
  • HarroHarro
    Accepted Answer
    Access denied.

    So:
    - your talking to the wrong database server
    - your username is not correct
    - the password is not correct
    - userid/password is ok, but no access rights to the selected database
  • what do you mean about talking to the wrong database server?

    i have installed an edited fuelphp on htdocs xampp and created a user pitdemo and grant privileges to the database with the same name of the user...and i have set password also for the user...

    for you sir where did i gone wrong?
  • I don't know, I've just listed the possible causes for this error. If you don't have multiple database servers, off course that point is not relevant for you.

    It's a PDO error, so something outside of FuelPHP. Which is either configuration at the application end (for example you configured config/development/db.php but you're running in production mode), or the server end (incorrect user, password or access rules).
  • Thank you for your time sir and sorry for the hassle. I had already fixed the problem just lately.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion