When I alter or repair a myisam table, it creates a temporary file in the same directory as of data directory.
How do I make it use /tmp directory?
I do not have enough space on the partition where the data directory is located.
Update:
http://dev.mysql.com/doc/refman/5.0/en/temporary-files.html
The last line of this page reads:
ALTER TABLE creates a temporary table in the same directory as the original table.
Repair table has an option but it does not work.
http://dev.mysql.com/doc/refman/5.0/en/myisamchk-repair-options.html#option_myisamchk_tmpdir
This seems to be a bug.
Usually mysql uses the
TMPDIRenvironment variable or a system default.See also the documentaion on temporary-files