I installed MariaDB on my windows server and saw it defaults the datadir where the databases are stored to C:\Program Files\MariaDB 10.2\data
I wanted it moved the the E: disk that's dedicated to database stuff.
I thought copying the datadir and then modifying the my.ini in the C:\Program Files\MariaDB 10.2\data
datadir would solve it, but when I tried to restart the service it wouldn't start.
I also tried setting the folder permissions to network service but that didn't seem to help.
What do I have to do to move my datadir on windows?
After a lot of searching I stumbled across http://baazgusht.blogspot.nl/2017/02/change-datadir-of-mariadb-in-window.html
It gave me the hint I needed to move the datadir on windows.
Net stop MariaDB
(or whatever you named your service. for me it was net stop "MariaDB 10_2_7"
C:\program files\mariadb 10.2\
(or wherever your mariadb is installed)xcopy data E:\MariaDB /O /X /E /H /K
(E:\MariaDb is my location, you may have another location. replace E:\MariaDB with whatever you want, just use the same value below for the datadir in my.ini)datadir=C:\Pro....
to datadir=E:\MariaDB
net start mariadb
(or whatever you named your service. for me it was net start "MariaDB 10_2_7"