Introduction
This article describes how to move the local installed MariaDB of the custo diagnostic database to another local location on the same server computer.
Moving the MariaDB
- Stop the Windows Service "Apache Tomcat 8.0 diagserver"
- Stop the Windows Service "diagserverdb"
- Create a folder in the new destination for the MariaDB database (Example: "D:\mariadb"). Do not use Network Dives or UNC Path for the new location!
- Move all files from the folder "C:\diagserverdata\mariadb" (default location) to the new location folder
Edit the file "my.ini" in the new location folder. You can use Notepad.exe.
Change the setting "datadir" below "[mysqld]" to the new location folder:my.ini[mysqld] datadir='D:\mariadb'
Dont forget to save the "my.ini"!
Change the Windows Service for the MariaDB service.
You have to open a cmd as administrator and with extended rights.
Insert this command and change the location in the "--defaults-file" option to your new location folder:Commandsc config diagserverdb binpath="\"C:\Program Files\custo diagnostic server\mariadb\bin\mysqld.exe\" \"--defaults-file=D:\mariadb\my.ini\" \"diagserverdb\""
Run the command.
If the command line returnes "[SC] ChangeServiceConfig SUCCESS" all things are fine. Otherwise you have to search for errors.
- Start the service "diagserverdb"
- Start the service "Apache Tomcat 8.0 diagserver"