简体   繁体   English

无法删除或加载表mysql“ SQLSTATE [HY000]:常规错误:1021磁盘已满”

[英]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. 导入的survey.sql [4.gb]文件。 it was in infinite loop of inserting record. 这是插入记录的无限循环。 loading and loading. 加载和加载。
  2. when i browse my site, it start showing me mysql error message 当我浏览我的网站时,它开始向我显示mysql错误消息
  3. SQLSTATE[HY000]: General error: 1021 Disk full (/var/tmp/#sql_4a67_3); SQLSTATE [HY000]:一般错误:1021磁盘已满(/ 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. 我想删除该表,但是每当我执行“ drop table survey; ”时,我就是无限循环。 i am using sequel pro 我正在使用sequel pro

i do also have SSH access. 我也有SSH访问权限。

Update: 更新: 在此处输入图片说明

Use ssh to access the server machine running MySQL. 使用ssh访问运行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 ... 会告诉您/var/tmp每个文件夹或文件正在使用多少空间,并且...

ls -lh 

will tell you the names and owners of the files. 会告诉您文件的名称和所有者。

Delete some. 删除一些。 Try your MySQL operations again. 再次尝试您的MySQL操作。

Don't let the filesystem holding that tmp directory fill up in production. 不要让保存该tmp目录的文件系统填满生产。

In future, when you have vast .sql files to run, try breaking them up into smaller files of about 10,000 INSERTs each. 将来,当您要运行大量的.sql文件时,请尝试将它们分解为更小的文件,每个文件约10,000个。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM