0

I'm currently writing a laravel application (7.4) and haven't had that many problems, then I cam back from the just gone weekend, booted up the local environment with artisan serve, and I've gotten the following;

SQLSTATE[HY000] [2006] MySQL server has gone away (SQL: select * from actions where date(time) = CURDATE() and type = hitBudget order by time desc)

That error comes up whenever the main page loads, which has a controller on it to fire off a query to populate something. The table is most certainly still there, as is the database as the LIVE version us still up and running. the IP in the .env file still points to the same server, the database credentials haven't changed at all, the only thing I recall valley is updating composer packages on the server a day or so before this happened.

Most solutions so far have pointed to timeouts, but the error occurs instantly and local works off the exact same database and tables that live does, yet live works fine.

Edit; I've done some fiddling and discovered that this error comes up regardless of what is set as the databases credentials in the .env file, I can set the host to 8.8.8.8 and its the same error, yet if I replace this ENV with a copy of the live one, it still persists.

Any ideas would be appreciated.

byond temp
  • 45
  • 1
  • 1
  • 5
  • 1
    Does this answer your question? [How to solve General error: 2006 MySQL server has gone away](https://stackoverflow.com/questions/33250453/how-to-solve-general-error-2006-mysql-server-has-gone-away) – Kamlesh Paul Sep 28 '20 at 08:33
  • Does this answer your question? [mysql server has gone away error during installing migration (laravel)](https://stackoverflow.com/questions/35036547/mysql-server-has-gone-away-error-during-installing-migration-laravel) – STA Sep 28 '20 at 08:41
  • neither of these are solutions, as stated in the question itself, the database is accessible but only from the server its running on. The timeout as as high as it can go and the credentials haven't changed. – byond temp Sep 28 '20 at 08:52

0 Answers0