We tried to move current mySql DB out of Linux system
partition by following the instructions in the links below
but mySql gave an error after migration:
https://www.digitalocean.com/community/tutorials/how-to-change-a-mysql-data-directory-to-a-new-location-on-centos-7
& how do I change the location of the data directory? (Doc ID 1023178.1)
https://www.digitalocean.com/community/tutorials/how-to-move-a-mysql-data-directory-to-a-new-location-on-ubuntu-16-04#step-3-%E2%80%94-configuring-apparmor-access-control-rules
# systemctl start mysqld
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.
DBA colleague told me there's not much of a clue from journalctl -xe
We're on RHEL 7. Have also tried to create soft links to new partition
but it did not work.
What's missed?
Hopefull don't have to export all data out, recreate DB & re-import:
we don't want this option
For example, you might be setting up a Docker volume or some other reason.
Same steps + there may be other considerations too.
Suggestion: Consider opening another question describing the problem which triggered your requirement to move /var/lib/mysql somewhere.
Likely you'll have some great suggestions about problem resolution.