Converting CoreProtect database from SQLite to MySQL
1 min readJun 27, 2017
Environment
- Minecraft Server 1.12
- CoreProtect 2.14.2
- MySQL 5.7
Workflow
- Export database.db to database.sql
- Fix columns of generated database.sql
- Create an empty MySQL database
- Launch a Minecraft server and connected to the MySQL database
- Stop the Minecraft server
- Import database.sql to MySQL
- Restart the Minecraft server and check with
/co i
command
Getting start
The most hard part is how to fix those .sql files in order to match MySQL columns. I wrote a script to do step 1 and 2 automatically.
It generates a database.sql
in working directory. Then you can import this file to MySQL table directly.
P.S. This script is written for macOS and did not tested on other OS like Windows or Linux.
Conclusion
It took me 10 hours for importing a 1GB database.sql to the MySQL server (1 vCPU, 614.4 MB RAM).
References
Converting CoreProtect database from sqlite to MySQL?:admincraft
Import of Flat File to MySQL #212