MySQL repair is using temporary disk space on C: drive

Document ID : KB000049826
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

When running a database repair using myisamchk, MySQL will use temporary directory space in two locations. One is the tmpdir setting defined in the $SPECROOT/mysql/my-spectrum.cnf file. The other setting used is Window's TEMP environment variable. Typically this is set to C:\Documents and Settings\<USER>\Local Settings\Temp.

Below is a typical error message seen when not enough disk space is available:

D:\win32app\SPECTRUM\mysql\bin\myisamchk.exe: Disk is full writing 'C:\DOCUME~1\<USER>\LOCALS~1\Temp\4\ST8.0 free space...Retry in 60 secs

Solution:

Ensure that the tmpdir setting in the $SPECROOT/mysql/my-spectrum.cnf file is set to a location that has ample disk space. In addition, prior to running a repair or optimize the user's TEMP variable should also be set to a location with enough disk space to run the repair/optimize; this is typically 2X the size of the largest database table.