0

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 to 777
  • 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.

Manashvi Birla
  • 2,837
  • 3
  • 14
  • 28
manish
  • 1
  • 1
  • What host are you using ? XAMPP, WampServer, EasyPHP, ... You simply don't have the right permissions, go check `httpd.conf` file – Hearner Jul 28 '15 at 10:51
  • You have wrong permissions on mysql data directory. – Jens Jul 28 '15 at 10:51
  • @jens File permission is set to 755 (/var/lib/mysql/) – manish Jul 28 '15 at 10:57
  • @Hearner I am using apache server, Ubuntu 14.04 x64 on digitalocean.com cloud hosting. I tried to locate httpd.conf file via command, but I received this file /etc/phpmyadmin/lighttpd.conf which has 644 permission. Kindly clarify if I need to check something else. – manish Jul 28 '15 at 11:11
  • OS error code 28: No space left on device – Álvaro González Jul 28 '15 at 12:30
  • Thanks for your reply. I've checked space using command df -h It is showing 71% in use. Do I need to increase space? – manish Jul 28 '15 at 13:35
  • The percentage is not as relevant as actual byte count: if you need to store 500MB and have 400MB free you're out of luck even if those 400MB represent 99% of the partition. Whatever, contents of the `/tmp` directory are likely to change across time—it might be just a transitory issue. – Álvaro González Jul 29 '15 at 07:33
  • Hi guys, I've increased droplet size, but again after few days it's giving same error. After troubleshoot I found I'm running out of inodes using 100%. Is there anything I can do to free some space? Please help – manish Aug 17 '15 at 07:21

0 Answers0