Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SebastianEP6's avatar

Database connection, error with .env

Hey, I'm working in a Laravel project that I already have uploaded to my hosting and It was running well, I've been making some changes from my localhost and then uploading the entire project with the exception of the hidden files and the public folder. Since yesterday It's throwing me an PDOException because It's using the data of mi .env file that I've configured in my localhost to connect to my hosting database, I already check my .env and confi/database.php files and they seem okay, I need to know if could be another kind of problem, like with my hosting or something like that. I deleted all the cache in my app

0 likes
4 replies
SebastianEP6's avatar

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

It's trying to connect with the data I have for my localhost, and I don't have that information in my .env in the hosting, It's like not reading it, It recognizes the APP_ENV variable but nothing else

bobbybouwmann's avatar

Make sure your config is not cached. You can do that by running php artisan config:clear

Please or to participate in this conversation.