skip to Main Content

I have uploaded my project on my hosting ..But when i tried to access form url I got the following Error

QueryException in Connection.php line 647:
SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)

I have changed the following credentials of .env

DB_DATABASE=cpanel_database
DB_USERNAME=cpanel_db_name
DB_PASSWORD=cpanel_db_password

What could be the error for getting the Above Error?

2

Answers


  1. Just make sure your database credentials are correct.
    Might be chance that configurations run from cache. once clear is by login in server via ssh or remove config.php file from bootstrap/cache/ folder.

    Good luck.

    Login or Signup to reply.
  2. Looks like it is not reading the credentials from your .env file. because it is reading root as the user instead of the username specified in the .env.

    Check to make sure it is reading the .env and not the default parameters in the config/database.php file

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search