The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

/tmp full due to MySQL spool files. Can I do this to resolve this.....

Discussion in 'Database Discussions' started by jols, Jun 5, 2013.

  1. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38
    Hi. With greater frequency lately I am getting warnings about the /tmp partition being full, or very nearly full. When I look into this, I see large MYD and MYI files are eating up all the space. (BTW, I know why, this is occurring, e.g. MySQL is running out of ram and so on.)

    So then I created a folder out side of /tmp for this, and inserted the following in /etc/my.cnf

    tmpdir = (path and name of outside folder here).

    I restarted MySQL and all, but the MYD and MYI files are still being created in the /tmp partition.

    Are there any steps I am missing which would make this work?
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Yes, please follow the instructions in the thread mentioned in the previous response. You can confirm the new MySQL tmp directory with the following command:

    Code:
    # mysqladmin var | grep tmpdir
    Thank you.
     
  4. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38
    Regarding this from the other post, "This presumes / partition itself has sufficient space. I would like to hope / partition would have more space than /tmp was provided on most systems. "

    Would there be any issue with putting /mysqltmp in the /home directory, and then of course configuring my.cnf accordingly? E.g. for:

    /home/mysqltmp

    ???
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page