Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQLSTATE[28000] [1045] Access denied for user 'root'

I have my project ready and I have just uploaded to a shared hosting server. Everything works perfectly fine on my local machine but the page is displaying the error: "SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)"

I have checked my password and username and they are both correct. The server requirements are also as I already have 2 other Laravel sites running with the same host.

I have done php artisan config:cache php artisan cache:clear But no headway.

What could be causing this and how do I get it solved? I earnestly need a solutions as this has kept me sleepless for nights now.

like image 708
Duune-V Avatar asked Mar 10 '26 04:03

Duune-V


1 Answers

try to with these 3 artisan command.

1) php artisan config:clear

2) php artisan cache:clear

3) php artisan config:cache

like image 70
jitendra kumar Avatar answered Mar 12 '26 18:03

jitendra kumar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!