Make sure that you have the right credentials in your .env file, and the correct database name and server.
Apr 15, 2025
13
Level 1
SQLSTATE[HY000] [2002] Connection refused table sessions
Hi guys.
I'm a little desperate with this issue. I've deployed a project to production.
I created the DBase and imported SQL with tables and corresponding data.
However, when I try to access the site, it shows me the following error:
SQLSTATE[HY000] [2002] Connection refused (Connection: mysql, SQL: select * from sessions where id = M4Uh039sUChdeOHtHM1vDnf4lEN2lY2Zk9e5oBTq limit 1)
I've checked the database connection information and it's correct. The sessions table exists, but I don't understand why it's throwing this error.
Has anyone had this problem and knows how to fix it?
Thanks in advance.
Best regards.
Please or to participate in this conversation.