I had this exact error message Error 13 (HY000)
which was solved using the LOCAL
option suggested by Abdul Manaf. However, I got stuck with a CSV file of size 101GB. WhiteWhile trying to import this CSV file, the system reported LOW Disk Space Warning and the import task was not finishing. Frustratingly, the disk utility Gui tools even df -h
command showed that my root directory had more than 85GB of diskspacedisk space left.
Then I learned that the LOCAL
option copies the CSV file to a temporary place in the root / directory. Then it reads from the temporary file. Since my CSV file of 101GB was bigger than the empty space left on my root / I was seeing the low disk warning, however, this was not detected in many guiGUI and command based-based tools except the system monitor which I recognized later. Since I am working on a mysqlMySQL database of more than 300GB, I had to move the mysqlMySQL data directory to another internal disk and I was importing the CSV from an external hard disk. Copying the 101GB csvCSV file into the mysql'sMySQL data directory in the internal disk let me run the LOAD DATA INFILE
command without any error message.
So be aware of LOCAL
option for a larger CSV files greater than the free space of your root directory. LOCAL option is also not a good idea for SSD's endurance.