Mysql – Change MySQL’s temp directory

MySQL

I'm trying to add keys to an InnoDB table. I started with the small ones(~6.8GB) and I encountered a problem. After a while of processing it throws an 1114 error(table is full). I restarted the process of adding indexes and monitor everything. The problem seems to be that it is using OS's temp dir(running Windows). I have it installed on another drive that has plenty of space. The error is thrown when the space on C:/ approaches 0. Is there anything I could do to have it save its temp files on the same drive where MySQL is installed and not on C:/ ? Thank you

Best Answer

Searched a bit more and I found the solution:

[mysqld]

tmpdir=[other drive]:/tmp

Now it's writing to the tmp directory on the wanted drive.