cannot start mariadb after migration on centos7(Note: my.cnf datadir updated)

Issues related to applications and software problems
Post Reply
hhurry
Posts: 1
Joined: 2021/09/20 10:50:09

cannot start mariadb after migration on centos7(Note: my.cnf datadir updated)

Post by hhurry » 2021/09/21 09:26:00

journalctl -xe output is as follows
Can't create test file /mnt/data/mysql/localhost.lower-test

Please help

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: cannot start mariadb after migration on centos7(Note: my.cnf datadir updated)

Post by TrevorH » 2021/09/21 10:39:33

If you want to use a non-standard mysql data location like that then you need to tell selinux that you are doing it. See man semanage-fcontext.

It's probably much easier just to mount your filesystem on the correct /var/lib/mysql location and then you won't have to do anything.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply