Changing the tmp folder of mysql

Maxim Dsouza picture Maxim Dsouza · Aug 16, 2012 · Viewed 107.6k times · Source

Our Mysql queries use temporary tables which creates temporary files in the process. Currently the files are written to /tmp. How exactly can the path of the temp folder to which mysql writes to be changed?

Answer

CyberDem0n picture CyberDem0n · Aug 16, 2012

You should edit your my.cnf

tmpdir = /whatewer/you/want

and after that restart mysql

P.S. Don't forget give write permissions to /whatewer/you/want for mysql user