Was the user added to MYSQL? Try the forge user with the db password sent when you created the server.
Only thought I have!
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I created a new Ubuntu server with Forge (deployment via git) and my site is working. BUT when I try to deploy new updates via git, it stalls out here:
> php artisan optimize
Generating optimized class loader
[PDOException]
SQLSTATE[HY000] [2002] Connection refused
I have the .env correct, the correct password for the database, I am using DB_HOST=127.0.0.1, and the site is loading properly. I just can't make any updates via git.
Does anyone have any insight into why this is happening? Thank you in advance.
NOTE: I can't connect to my database via Sequel Pro either...
Please or to participate in this conversation.