MySQL Error 1021 (ER_DISK_FULL) occurs when the server cannot write to disk because the partition holding data, temporary files, or logs has no free space.
MySQL Error 1021: ER_DISK_FULL means the server ran out of disk space while writing data or temp files. Free space on the MySQL, tmp, or log partitions, then restart or resume the transaction to resolve the issue.
Disk full (%s); waiting for someone to free some space...
MySQL raises Error 1021 (SQLSTATE HY000) when it attempts to write to a data file, temporary table, binary log, or InnoDB redo log but the underlying filesystem reports no available space. The server stops the current statement and waits for disk capacity to be released.
This error can appear on Linux, macOS, Windows, and cloud volumes.
It is critical to fix quickly because writes are blocked, causing application downtime and possible transaction rollbacks.
Insufficient free space on the data directory is the primary trigger. Large INSERT ... SELECT, ALTER TABLE, or CREATE INDEX operations can suddenly consume gigabytes in the tmpdir or InnoDB temporary files.
Binary log retention, oversized undo logs, or a runaway slow query creating massive temporary tables also fill disks.
On virtual machines, thin-provisioned storage may silently hit the provider quota and surface as ER_DISK_FULL.
First, check df -h (Linux) or disk utility to confirm which mount point is full. Remove or archive old binary logs with PURGE BINARY LOGS, truncate general/slow logs, or relocate them to a larger volume.
Increase the partition size, move the tmpdir to a disk with free space, or add a new data file to the InnoDB tablespace.
After freeing space, retry the failed statement or let transactions continue.
During an ALTER TABLE ADD COLUMN, MySQL creates a full table copy in the tmpdir. Redirect tmpdir to /mnt/bigssd and rerun the command.
Large binary log retention causes disk growth. Enable expire_logs_days or binlog_expire_logs_seconds to prune automatically.
Monitor disk usage with cron jobs or cloud alerts and keep at least 20 percent free. Compress and rotate logs using logrotate.
Set innodb_log_file_size appropriately for workload to avoid bloated redo logs.
Galaxy’s SQL editor integrates disk-usage checks into its AI copilot. When it detects a 1021 error in query output, it suggests immediate cleanup commands and flags the affected server in your workspace.
MySQL Error 1114 "Table is full" occurs when the storage engine hits its size limit, not the filesystem. Error 1030 "Got error %d from storage engine" can wrap the same ENOSPC condition inside InnoDB.
Resolve them with the same free-space techniques.
.
Maintain at least 20 percent free space on data and tmpdir volumes. This buffer accommodates sudden spikes from large queries or binary logs.
Yes. Once the filesystem has free blocks, MySQL resumes writes. Long transactions may need a retry if they were rolled back.
Yes. tmpdir is read at startup. Modify my.cnf and restart or use symbolic links to redirect temporary files without downtime.
Galaxy’s AI copilot detects ER_DISK_FULL in query results, surfaces disk metrics, and proposes binlog purging or tmpdir relocation steps inside the editor.