Using tmpfs for temporary folder creation

If you are on Ubuntu, then do this first:

vim /etc/apparmor.d/usr.sbin.mysqld

Add a line:

/run/mysqld/tmp/** rwk,

Restart Apparmor

service apparmor restart

Also create tmp directory and fix ownership/permissions.

mkdir /run/mysqld/tmp/
chown -R mysql:mysql /run/mysqld/tmp/
chmod 1777 /run/mysqld/tmp/

Edit mysql config

Open my.cnf file

vim /etc/mysql/my.cnf

Set/Change tmpdir location

tmpdir = /run/mysqld/tmp

Restart Mysql

service mysql restart

3 thoughts on “Using tmpfs for temporary folder creation

  1. Hi Rahul Bansal,

    I have been following your tutorials from long ago, also i just installed your awesome script EasyEngine and i would like to know if it is using tmpfs for temporary folder creation.

    Keep the good work guys.

  2. Hello George Martinez,

    Right now EasyEngine doesn’t used tmpfs for temporary folder creation.

Comments are closed on this article.
Please use our free support forum for support and discussions.