Dipendra's avatar

Error on accessing a database

I have done project in laravel 5.2 its work perfectly on localmachine but when i upload the file it give the error

PDOException in Connector.php line 55: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)

though i had change my .env and config/database.php according to my database and username but still show the localmachine username,passowrd and database.

0 likes
4 replies
tomopongrac's avatar

Did you put

APP_ENV=local

Maybe you need to restart server

tomopongrac's avatar

Sorry you need to write

APP_ENV=production

I think that you in local enviroment

ehben's avatar

Do you have a "root" user in your DB with this password ?

Please or to participate in this conversation.