How to change default directory of mariadb?
Issue
- Unable to start service mariadb. Getting below errors after changing default data directory to
/mnt/data/mysql
Database MariaDB is not initialized, but the directory /mnt/data/my>
Make sure the /mnt/data/mysql/ is empty before running mysql-prepar>
mariadb.service: Control process exited, code=exited status=1
systemd[1]: mariadb.service: Failed with result 'exit-code'.
systemd[1]: Failed to start MariaDB 10.3 database server.
Environment
- Red Hat Enterprise Linux (RHEL) 7
- mariadb
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.