0

I am using MAMP in the macOs. I was download the laravel 5 from cpanel. I am getting this error:

SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO) (SQL: select * from `products` where `pro_status` = 1 and `pro_stock` > 0 order by `pro_id` desc limit 8)

But can't fix it.

Majid Hajibaba
  • 3,105
  • 6
  • 23
  • 55
phplover
  • 17
  • 5
  • 1
    enc file use quote for password if you have spcial character. DB_PASSWORD="sfsa" – John Lobo Jun 16 '21 at 12:57
  • Does this answer your question? [SQLSTATE\[HY000\] \[1045\] Access denied for user 'root'@'localhost' (using password: NO) . DB\_HOST set to localhost](https://stackoverflow.com/questions/58233866/sqlstatehy000-1045-access-denied-for-user-rootlocalhost-using-password) – Peppermintology Jun 16 '21 at 12:58

1 Answers1

0

Just set 'password'. That solved my problem.

ouflak
  • 2,458
  • 10
  • 44
  • 49