I did this in Fedora 20, but in your Windows case things are similar.
Stop MariaDB using the following command:
service mariadb stop
or (for more recent Fedora versions)
sudo systemctl stop mariadb
Make sure the parent directory of the new data directory has execute permissions.
namei -mo /path/to/directory chmod +x /path/to/parent
Copy the existing data directory (default located in /var/lib/mysql) using the following command:
sudo cp -R -p /var/lib/mysql /newpath
Edit the MariaDB configuration file with the following command:
vim /etc/my.cnf.d/server.cnf
or (for more recent MariaDB versions)
vim /etc/my.cnf.d/mariadb-server.cnf
Look for the entry for datadir, or create one under [mysqld] and change the path (which should be /var/lib/mysql) to the new data directory.
datadir = /newpath
Restart MySQL with the command:
service mariadb start
or (for more recent Fedora versions)
sudo systemctl start mariadb