MySQL Error Code: 3 Error Log Files (Errcode: 28)

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

SELECT COUNT(DISTINCT col) FROM table; 

I get 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 searching. Perhaps this is a problem with disk space? But I have 21 GB of free space in C. Does the count command require more than that for a single column?

EDIT:: the temporary file name is not permanent. Every time I execute a command, I get a different name in the error message.

+6
source share
1 answer

Verify that the mysql process user has write access to C:\Windows\temp . As a rule, you do not want to write in C:\Windows ... you better install the directory in a different place .


OK What file system is used on drive C? Perhaps you have too many files in this directory if you are using FAT16 / FAT32?

+1
source

Source: https://habr.com/ru/post/923046/


All Articles