Search code examples
mysqltmp

Changing the tmp folder of mysql


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