I do not have enough space on my root partition to store the database.
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ManjaroVG-ManjaroRoot 29G 21G 6.4G 77% /
dev 1.9G 0 1.9G 0% /dev
run 1.9G 852K 1.9G 1% /run
tmpfs 1.9G 76K 1.9G 1% /dev/shm
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
tmpfs 1.9G 596K 1.9G 1% /tmp
/dev/mapper/ManjaroVG-ManjaroHome 197G 54G 133G 29% /home
/dev/sda1 247M 88M 147M 38% /boot
tmpfs 383M 8.0K 383M 1% /run/user/1000
Changing datadir in my.cnf
to a new location caused a permission problem ([Warning] Can't create test file /home/u/tmp/mysql/acpfg.lower-test
)
How is it possible change the directory where MariaDB/MySQL stores the database under Linux (for example to /home/u/tmp/mysql)?
/swapfile
size.