2

We have a database in computers (some of them are raspberrys or similar). The disk storage is aprox. 8 GB. When put MySQL running and start filling a database. When the disk storage is full, MySQL trought:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I don't know so much about MySQL, but if the disk storage is full, MySQL will stop filling the database, but it doesn't mean you can't login into MySQL and see all databases.

Is this normal? How to solve this without lose all the information in database?

More info: SO: Ubuntu 12.04 or Raspbian. MySQL Server and Client.

Santiago Mendoza Ramirez
  • 1,497
  • 2
  • 13
  • 26

1 Answers1

1

As a solution, try using different partitions for MySQL and storage. And, yes, this is normal. I don't know much about MySQL internals but I suppose that it tries to write down something, such as a session ID or maybe some other internal actions need space on disk.

s3v3n
  • 8,203
  • 5
  • 42
  • 56
  • We've made some tests, and i think you're correct. Do you have any tutorial to install MySQL in one partition and storage of mysql data (i.e databases) in another? – Santiago Mendoza Ramirez Apr 22 '15 at 21:35
  • 1
    You can try this one http://stackoverflow.com/questions/1795176/how-to-change-mysql-data-directory , but I would recommend leaving `MySQL` as it is and creating a separate partition for your storage, for this you can specify the mountpoint in `/etc/fstab`, here's an example for debian: https://wiki.debian.org/fstab and I think it'll work for Ubuntu as well – s3v3n Apr 22 '15 at 21:54