Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL Error Code: 3 error writing file (Errcode: 28)

Tags:

mysql

I am trying to execute a query to return the number of records (which is around 4 millions).

SELECT COUNT(DISTINCT col) FROM table;

I am getting this error: mysql Error Code: 3 error writing file 'C:\Winows\temp\Myffd3.tmp' (Errcode: 28).

What is the cause of the problem. How to fix it? I tried t search, It might seems a disk space issue ? But I have 21 GB free space in the C. Does count command fro one columns require more than this ?

EDIT: : The temp file name is not permanent. Each time I execute the command, I get different name in the error message.

like image 863
Jury A Avatar asked Aug 16 '12 15:08

Jury A


People also ask

What is MySQL error writing file errcode 28?

What is MYSQL error writing file errcode 28? The error occurs when there is not enough disk space to run the database on the server. Also, this error was causing the SQL commands not to work properly. Again, one of the top reasons for this mysql error writing file errcode 28 is insufficient space for MySQL to create temp files.

What happened to /TMP in /errcode 28?

After debug on the code I got error writing file /tmp (errcode 28). This error was causing my sql commands not to work properly and that's why the script was broken. On server /tmp partition was 2GB of space but it seems, that was little space for the information that my parallel script was allocating during execution.

What is error writing file ‘/tmp/mymi5iqh’ (errcode 28)?

Error writing file ‘/tmp/MYMI5iqH’ (Errcode: 28) error . With following command in ubuntu terminal we got the error description : So that was the actual reason, no space left in the partition in which /tmp folder is located.

What is the error code for SQLSTATE[hy000]?

PDOException: SQLSTATE[HY000]: General error: 3 Error writing file '/tmp/MYHKgYpv' (Errcode: 28) 2 Mysql Select query error in live server : Errcode: 28 - No space left on device Hot Network Questions Protecting the team against injection This looks like it may be part of a building


1 Answers

Check that the mysql process user has write access to C:\Windows\temp. Generally, you don't want to be writing to C:\Windows... you are better off setting the directory to somewhere else.


OK. What is the file system used on C drive? Perhaps you have too many files in that directory if you're using FAT16 / FAT32 ?

like image 83
Peter K. Avatar answered Oct 04 '22 03:10

Peter K.