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 on a Windows Computer
- 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'
Don't forget to save the "my.ini" file!
Change the Windows Service for the MariaDB service.
You have to open a CMD as an administrator and with elevated rights.
Insert this command and change the location of 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"
Moving the MariaDB on a macOS based Computer
- Install custo diagnostic server on the new Computer. The diagserver service will be started automatically.
- When the diagserver service is running fine please stop the diagserver service (at the earliest 2 minutes after starting).
- Open the path "/Library/Application Support/custo diagnosticserver/" and delete or rename the folder "database" and the evaluation folder.
- On the old System stop the diagserver service.
- After the diagserver service is stopped open the path "/Library/Application Support/custo diagnosticserver/" and copy or move the the folder "database" and the evaluation folder to the new computer.
- Start the diagserver service on the new computer.
- Remove or uninstall the custo diagnostic server from the old computer.
Convert Maria DB to macOS
- install diag Client/server on macOS
- create a backup via servicecenter "backup task" in the windows system
- copy database to desktop (is a example)
- stop the diagserver in macOS via command line: sudo launchctl bootout system "/Library/LaunchDaemons/de.customed.diag.server.plist"
- open command line in macOS
- input the following command with correct with the name from the backup: sudo /Library/custodiagnosticserver/mysql/bin/mysql --defaults-extra-file='/Library/Application Support/custo med/custodiagnosticserver/database/secrets/root@localhost.cnf' diagdb < "~/Desktop/2025-04-08_16_32.db.backup.sql"
- new start diag server