0

Everything was working fine till my last visit to my website. But now when I try to access my website, it displays this error.

SQLSTATE[28000] [1045] Access denied for user 'medindinDB'@'127.0.0.1' (using password: YES) (SQL: select * from 'inventory')

None of the code has been changed. I have also tried to clear cache as directed in this question

https://stackoverflow.com/a/41650432/8582983

.env file

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=inventory
DB_USERNAME=medindinDB
DB_PASSWORD=********

My website is hosted on cpanel.

Ujjwal Verma
  • 83
  • 1
  • 9
  • `from 'inventory'` is incorrect syntax but that doesn't explain the message. The output of the SQL also is strange, did you do output a query after? Could you please add your code with credentials redacted? – user3783243 Jan 30 '19 at 04:03
  • Please add the PHP code. You have a database and table with the same name? – user3783243 Jan 30 '19 at 04:10
  • yes. The problem here is the database connection. I have a database with the name of inventory. @user3783243 – Ujjwal Verma Jan 30 '19 at 04:23

0 Answers0