3
My MAC disconnected out of nowhere and when connected again stopped working Mysql.
Mysql is installed by MAMP.
Is giving this error when accessing only one website:
SQLSTATE[HY000] [2002] Can’t connect to local Mysql server through socket '/Applications/MAMP/tmp/mysql/mysql.Sock' (61)
No website works. I did Laravel.
I already gave folder permission. But I can’t solve for anything.
I just haven’t reinstalled MAMP yet.
Problem
When you turned off the MAC I was putting a column in a table. Now I went to see the table does not open anymore, it is an error. It does not load the records. It is possible to recover ?
I already gave CHECK TABLE SUBMENUS
, but you don’t notice. I also did REPAIR TABLE SUBMENUS
, nothing either.
Error:
Lost Connection to Mysql server During query
Try this -
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock
– Edilson
I did that. Finally, I discovered the problem @Edilson. When the MAC shut down I was going through the database, making a change. And that corrupted a chart. I debugged at Laravel where I was stopping... and obviously I was stopping at a Middleware that was building the System Menu. Then I saw that the problem was when the code tried to access the table
Submenus
. In short, I lost the table. Good that there were few data and I knew it in my head. But I ran this code that you said. Good.– Diego Souza
I’m glad you located the problem.
– Edilson