Restitutor is the pride of <SUBJECT HOMETOWN HERE>

Porting MC4 MySQL Data

No replies
RestitutorOrbis's picture
Name: RestitutorOrbis (Restitutor)
Offline
Princeps
Joined: Aug 24 2014
Posts:

First the following commands were run in the MySQL console.
USE mcserver;
SHOW TABLES;

Copy All to Clipboard was used with a rectangular selection.
All spaces were removed to get a simple list of MC4 CoreProtect tables.
All lines were selected and Notepad++ was used to join the lines with spaces.

An sh file was created an executed to export the MC4 MySQL data.
mysqldump mcserver co4_art_map co4_block co4_chat co4_command co4_container co4_entity co4_entity_map co4_material_map co4_session co4_sign co4_skull co4_user co4_username_log co4_version co4_world > export.sql

Rectangular selection was once again used to drop MC4's MySQL tables.
DROP TABLE IF EXISTS `co4_art_map`;
DROP TABLE IF EXISTS `co4_block`;
DROP TABLE IF EXISTS `co4_chat`;
DROP TABLE IF EXISTS `co4_command`;
DROP TABLE IF EXISTS `co4_container`;
DROP TABLE IF EXISTS `co4_entity`;
DROP TABLE IF EXISTS `co4_entity_map`;
DROP TABLE IF EXISTS `co4_material_map`;
DROP TABLE IF EXISTS `co4_session`;
DROP TABLE IF EXISTS `co4_sign`;
DROP TABLE IF EXISTS `co4_skull`;
DROP TABLE IF EXISTS `co4_user`;
DROP TABLE IF EXISTS `co4_username_log`;
DROP TABLE IF EXISTS `co4_version`;
DROP TABLE IF EXISTS `co4_world`;

Now, skyblock database and user were created.
CoreProtect's config.yml was also redone.

The export.sql was now imported on the new machine.
mysql -u root -p skyblock < export.sql

To rename the co4 prefix to co, rectangular selections were once again used.
RENAME TABLE `co4_art_map` TO `co_art_map`;
RENAME TABLE `co4_block` TO `co_block`;
RENAME TABLE `co4_chat` TO `co_chat`;
RENAME TABLE `co4_command` TO `co_command`;
RENAME TABLE `co4_container` TO `co_container`;
RENAME TABLE `co4_entity` TO `co_entity`;
RENAME TABLE `co4_entity_map` TO `co_entity_map`;
RENAME TABLE `co4_material_map` TO `co_material_map`;
RENAME TABLE `co4_session` TO `co_session`;
RENAME TABLE `co4_sign` TO `co_sign`;
RENAME TABLE `co4_skull` TO `co_skull`;
RENAME TABLE `co4_user` TO `co_user`;
RENAME TABLE `co4_username_log` TO `co_username_log`;
RENAME TABLE `co4_version` TO `co_version`;
RENAME TABLE `co4_world` TO `co_world`;

n/a