Moving MariaDB Application to Another Volume

Moving MariaDB

Overview

This article goes over the steps to move the MariaDB database engine and databases that it manages to a different volume. This can be very useful when the current volume is running low on disk space.


Steps:

  1. From Windows Services Disable the MariaDB Service
  2. Reboot PC (this step may not always be necessary but will ensure that all database connections have been closed).
  3. Move the MariaDB 10.4 folder from the current location to the new volume using Windows File Explorer.
  4. Update the two path locations in the my.ini file located in the MariaDB 10.4\Data folder to now point to the new volume.
  5. Open up the Windows Registry (regedt32) and navigate to the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MariaDB and modify the ImagePath to point to the new volume.
  6. Open up the Windows Firewall and modify the inbound rule for MariaDB to now reference the new volume.
  7. From Windows Services, make sure that the user assigned to run the MariaDB Service can write to the new location or use the administrator account instead of the Network Service account if it does not have write permissions to the new volume.
  8. From Windows Services, set the  MariaDB Service to Automatic and restart the service.


Was this article helpful?