Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Change MariaDB tmp folder?

Discussion in 'Database Discussion' started by geokat, Jul 15, 2018.

  1. geokat

    geokat Member

    Jul 25, 2015
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    I try to change tmp folder of mariadb because I found out that files .MAD are are constantly being created inside tmp folder and despite the fact that I increased the tmp folder from the beginning of the installation of cpanel to 15GB are filling the space with results operational problems of cpanel.

    The tutorials I found on the internet are to create in /home directory a folder for example called mysqltmp to chown mysql:mysql and chmod 1777. Then add parameter to my.cnf like tmpdir=/home/mysqltmp. But after restart mariadb is not starting and exiting with error.

    Am I doing something wrong?

  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hello @geokat,

    Using a data directory within /home, /usr, /etc, /boot, or /root is unsupported because MariaDB uses a default systemd unit configuration that enables the "ProtectSystem" and "ProtectHome" features.

    The best approach to solving this problem is attempting to determine what's leading to the excessive temporary space utilized by MariaDB. There's an answer on the following StackOverflow discussion noting one method of doing this:

    As far as workarounds related to the size of the MySQL temporary directory itself, while unsupported, setting up a bind mount to point /var/lib/mysqltmp/ to the desired /home/mysqltmp directory should allow it to work until you've had a chance to increase the size of your /var/ partition or migrate to a server with a new partition scheme.

    Thank you.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice