Muhammad
Muhammad

Reputation: 3250

can't delete or load the table mysql "SQLSTATE[HY000]: General error: 1021 Disk full"

i am facing the following problem

  1. imported survey.sql [4.gb] file. it was in infinite loop of inserting record. loading and loading.
  2. when i browse my site, it start showing me mysql error message
  3. SQLSTATE[HY000]: General error: 1021 Disk full (/var/tmp/#sql_4a67_3); waiting for someone to free some space...
  4. now i can't remove my table or can't load it. just stuck with it.

i want to drop that table but whenever i execute "drop table survey;" i is just infinite loop. i am using sequel pro

i do also have SSH access.

Update: enter image description here

Upvotes: 0

Views: 2871

Answers (1)

O. Jones
O. Jones

Reputation: 108651

Use ssh to access the server machine running MySQL.

then ...

cd /var/tmp
df -h .

This will tell you how much space is available on that filesystem. Not much, I'll wager.

then ...

du -sh *

will tell you how much space each folder or file in /var/tmp is using, and ...

ls -lh 

will tell you the names and owners of the files.

Delete some. Try your MySQL operations again.

Don't let the filesystem holding that tmp directory fill up in production.

In future, when you have vast .sql files to run, try breaking them up into smaller files of about 10,000 INSERTs each.

Upvotes: 4

Related Questions