---

How to Change a Default MySQL/MariaDB Data Directory in Linux

For this reason, in this article we will explain how to change the default MySQL / MariaDB data directory to a different path on a CentOS/RHEL 7 server and Ubuntu/Debian distributions.