Changing the tmp folder of mysql

Issue

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?

Solution

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

Answered By – CyberDem0n

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published