1

I done,

  • Connect mysql in terminal by root user which has grant access.
  • Run php artisan cache:clear && php artisan config:cache.
  • Created another user & give Grant access.
  • Connect SQLyog via SSH (using PEM file) & also create db & tables there.
  • env file multiple times check and typos also.

Still I can not able to receive success response from my API url.

my env files variable

DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=my_db_name
DB_USERNAME=root
DB_PASSWORD=my_secret_pw

Please suggest me, what's the issue or missing something ?

Osama
  • 21
  • 2

1 Answers1

1

I have fixed this. When I found this question SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO) . DB_HOST set to localhost

I have a same situation but didn't find this earlier.

Really thanks to all of them who contribute in above question.

"" (Double Quotes) matter, very!!!

Osama
  • 21
  • 2