My site is broken, from last few days I'm continuously getting mysql error.
In starting I was receiving this error almost everyday, which was fixed by doing some changes in my.cnf
file.
SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
But from last few days I am receiving this error:
SQLSTATE[HY000]: General error: 1 Can't create/write to file '/tmp/#sql_439_0.MYI' (Errcode: 28) Solution I tried:
- changed
tmp
directory permission to777
- add
tmpdir=/tmp
to my.cnf under [mysqld] sudo reboot
(Temp fix)
I'm afraid to reinstall mysql, as these things are new for me and I don't want to loose any data. Any suggestion will be appreciated.