How can I change the MariaDB data folder


I’m trying to change the MariaDB data folder. The default location “/mnt/HD_a4/.@database@” is quite tiny and fills up fast.

Tried adding:


to the /etc/my.cnf under [mysqld] section and restarted the server, but it didn’t work.

Is there any other configuration file that overwrites the setting? Or am I missing something else?

Any help would be much appreciated.

I stopped Maria DB, moved the /mnt/HD_a4/.@database@ folder to /mnt/HD/HD_a2/ and then created a symbolic link from named /mnt/HD_a4/.@database@ pointing to the actual Maria DB directory structure now located at /mnt/HD/HD_a2/.@database@ then restarted the Maria DB server.

This configuration survives reboots, I would assume will survive firmware updates and there is no need to try change any Maria DB configuration files.

It’s strange why WD configured Maria DB the way they did and put the database on a small partition.