Possible Duplicate:
ERROR: The partition with /var/lib/mysql is too full!


I am running in a problem here I have a linux instance running on EC2. All was working fine till last night. Today morning it showed me some error stating that there was no disk space to write of mysql.

So I tried to stop and start mysql server. Stopping worked fine, but when i start with following command

sudo /etc/init.d/mysql start

It is showing me the error

ERROR: The partition with /var/lib/mysql is too full!


  • Looks like you're out of space – Andrew Cooper Apr 7 '11 at 6:35
  • I think you need to upgrade to a server with more database space. But, I would start by looking at some disk usages to identify which tables are the culprits and check whether those were supposed to grow like that. If not, then there is more to look for. – Rasika Apr 7 '11 at 6:36
  • @WhiteFang34 which files i should delete??? – jimy Apr 7 '11 at 6:42
  • the ones you don't need! – Alnitak Apr 7 '11 at 6:45
  • I tried many of the log files but its making no difference – jimy Apr 7 '11 at 6:47

You can check the amount of free space on your partition with the command: df You can also check which partition holds the directory /var/lib/mysql for example with the mount command.

Many distributions have their /var directory in the original root partition which is not made big enough by default to hold real-life data. They usually create separate partition for /usr with tons of space, so your easiest solution would be to stop mysql, copy /var/lib/mysql to /usr/lib/mysql (or /usr/local/lib/mysql no real difference), delete the original and make a symbolic link in the old place with:

ln -s /usr/lib/mysql /var/lib/mysql

Of course check that the destination directory have the right permissions.

  • 2
    How do I check that with the mount command? What is the command? – rtconner Aug 23 '14 at 19:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.