This article will guide you to move MariaDB database from one drive to another drive.
- Stop MariaDB service, or in this case, the ‘UnityISDB’ service.
- Copy contents of the MariaDB ‘data’ folder in the original location into the new location (new drive). Do not use the Copy/Paste function. Instead, use the Command Line tool called ROBOCOPY.
- Run the Command Prompt as administrator.
- Enter in in the command: ROBOCOPY drive:\source drive:\destination /E /COPY:DATASO /DCOPY:T
- Edit the ‘my.ini’ file in the ‘data’ folder from original location. NOTE: make a copy of the my.ini file in case
- Change the value called ‘datadir’to point to new location, for example:
[mysqld]
datadir=E:/MariaDB - You can now delete the entire contents of the original ‘data’ folder EXCEPT for the ‘my.ini’ file. It should look something like this:
Original data folder
New 'data' folder
- Start the MariaDB Service, or in this case the ‘UnityISDB’ service
- This Completes the moving process