The way ubuntu mysql changes the tmp path

  • 2020-05-10 23:25:00
  • OfStack

ubuntu is an linux operating system; Here's a site that shows you how ubuntu mysql can change the tmp path.

Since mysql often has to pin files into the tmp directory, and tmp has a directory of /tmp, consider changing the tmpdir directory to /run/shm for better performance, even using memory for storage.

1, open/etc/mysql/my cnf

Change tmpdir = /tmp to


tmpdir = /run/shm

2, change/etc/apparmor. d/usr sbin. mysqld added:


/run/shm/* rw,

3. Restart mysql and apparmor


/etc/init.d/apparmor restart
/etc/init.d/mysql restart

Related articles: