My main volume is a 20GB SSD disk mounted on /. I have a 4TB HDD mounted in /home. So to save space I want to set the mysql temporary directory to /home/mysqltmp.
However when I set to this directory mysql won't start. I get error:
mysqld: Can't create/write to file '/home/mysqltmp/ibm7cVN0' (Errcode: 13 "Permission denied")
I checked the permission and it is correct:
# ls -ld /home/mysqltmp/
drwxrwxrwx 2 mysql mysql 4096 Apr 4 03:19 /home/mysqltmp/
Running mysqld as root it starts without problem.
Server:
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
Note: Problem arose after updating to 16.04, was working on 14.04
MySQL details:
# mysql -V
mysql Ver 15.1 Distrib 10.1.38-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
ls -ld /home
), the /home/mysqltmp/ibm7cVN0 permissions (ditto) and the user/group runing the MySQL server (see inside my.cnf file). Also, check if filesystem has enough free space and inodes (df -h
anddf -hi
), and if is mounted rw (mount
orfindmnt
orcat /proc/mounts
)mysql
andmysql
.