USA - Toll Free: +1-866-221-0634
USA - From abroad: +1-408-701-9009
USA - Subscription Renewals: +1-866-830-4410
Latin America: +1 512 535 7751
UK: +44 845 399 1124
Ireland: +353 1 6919191
Germany: +49 89 420 95 98 95
France: +33 1 70 38 72 00
Sweden: +46 730 207 871
Benelux: +358 50 5710 528
Italy: +39 06-99268193
Israel: +358 50 5710 528
Spain & Portugal: + 34 933905461
Other EMEA countries: +353 1 6919191
Asia Pacific: +81 3 5918 7507
Learn about new MySQL releases, technical articles, events and more.
What is error 28 and how can I avoid it?
Using the command line tool perror you can find out, what the error 28 means.
> perror 28
Error code 28: No space left on device
If you get his error, you need to check all filesystems where MySQL operates. It may be single filesystem or as we recommend you can have datadir, tmpdir and log files split into dedicated filesystems. MySQL often creates temporary tables for some queries - most of them are placed in tmpdir, but some into database directory (e.g. ALTER TABLE). You must ensure, that there is enough free disk space available for MySQL.
You can check out, that environment variables for MySQL are properly set.
Check the value of tmp_table_size:
mysql> show variables like "tmp_table_size";
+----------------+----------+
| Variable_name | Value |
+----------------+----------+
| tmp_table_size | 33554432 |
+----------------+----------+
This tells, what is the limit, when reached, in-memory temporary tables will automatically be converted to a disk-based MyISAM table.
Then you need to find out, where the 'tmpdir' points
mysql> show variables like "tmpdir";
+---------------+-------------+
| Variable_name | Value |
+---------------+-------------+
| tmpdir | /tmp/mysql/ |
+---------------+-------------+
And check, that there is plenty of space available in that device.
