0

I recently upgrade from EE2 to EE5 locally on my laptop before moving to a remote location. When moving to a remote location, I get database errors.

SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
ee/legacy/database/drivers/mysqli/mysqli_connection.php:78

Has anyone seen this? I need help figuring this out.

Thanks!

3

In EE 3/4/5, your database connection configuration lives in your system/user/config/config.php file. The configuration should look like this:

$config['database'] = array (
    'expressionengine' =>
        array (
            'database' => '',
            'hostname' => '',
            'username' => '',
            'password' => ''
        ),
);

Fill in the array with your appropriate values.

If this information is there and correct, you need to diagnose your MySQL running instance and verify your credentials actually work. I would recommend testing at the command line like so (when SSHed into your server):

mysql -h {mysql_server_address} -u {user_name} -p

This should then prompt you with a password, which if you get correct, should log you into the MySQL CLI. If this doesn't work from your command line, your server most likely can't connect to the MySQL server and you need to start from there.

| improve this answer | |
  • This is it. For some reason, my build was missing username, so once I added it worked. Thanks! – jmdesigner81 Jan 8 at 0:24
0

Looks like you need to check that the updated installation has the correct information about how to access MySQL on your remote server.

In EE2 this information was stored in a separate file (database.php) in your config folder. In EE5 this information is included in the main config.php file - so it is possible that you made the changes but to the wrong file...

Good luck!

HTH

| improve this answer | |
  • I think you're right, but I have yet to find the answer. – jmdesigner81 Jan 7 at 18:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.