0

After I uploaded my Laravel project in Cpanel I have to configure my env file according to my database. I put database name, database user name and password also. but after I save in the database and refresh my browser. it says

SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO) (SQL: select * from sliders)

even though I have changed env file in server. but still showing me root@localhost.

Can't figure it out how to solve this.

miken32
  • 42,008
  • 16
  • 111
  • 154
A4family
  • 73
  • 1
  • 10
  • Does this answer your question? [Laravel not reading changes to .env file](https://stackoverflow.com/questions/34420761/laravel-not-reading-changes-to-env-file) – miken32 Aug 04 '23 at 17:44

1 Answers1

4

run php artisan config:clear

mostly because of .env being cached

Ghiffari Assamar
  • 650
  • 4
  • 14