PHP database connection error

I am getting the following error while trying to create a filament user with the artisan command. I can understand the error is due to not being bale to connect to the DB. Is there a place where I can configure this? Maybe specifically mention a separate connection or something.
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: nodename nor servname provided, or not known (Connection: mysql, SQL: select exists(select * from `users` where `email` = [email protected]) as `exists`)
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: nodename nor servname provided, or not known (Connection: mysql, SQL: select exists(select * from `users` where `email` = [email protected]) as `exists`)
12 Replies
Dennis Koch
Dennis Koch10mo ago
This is your normal Laravel DB connection. Which is configured in .env
K R A T O S
K R A T O SOP10mo ago
Thank you for your prompt response. I have a different port for the connection as i have multiple apps running in my machine.. So I change the FORWARD_DB_PORT to 3309... I can connect to the DB from my app without any problems... Only the filament user command throws me this. Any specific config to add/modify?
K R A T O S
K R A T O SOP10mo ago
No description
Dennis Koch
Dennis Koch10mo ago
That's weird. Filament isn't using another connection.
K R A T O S
K R A T O SOP10mo ago
No description
K R A T O S
K R A T O SOP10mo ago
the sql part frm docker-compose
Dennis Koch
Dennis Koch10mo ago
Are you running the command inside the sail image?
K R A T O S
K R A T O SOP10mo ago
Yeah.
Dennis Koch
Dennis Koch10mo ago
I have never used Sail. Sorry, not a big help
K R A T O S
K R A T O SOP10mo ago
No worries. Thanks for your help. I'll post the answer here if I find one!
Soulsight
Soulsight10mo ago
if networks is sail , host shouldn't be sail ?
Pritbor
Pritbor10mo ago
Please check if your MariaDB server is running in Docker Desktop.
Want results from more Discord servers?
Add your server