mcMMO-Dev / mcMMO

The RPG Lover's Mod!
https://mcmmo.org
GNU General Public License v3.0
1.01k stars 863 forks source link

How to convert from myslq to flatfile? #1401

Closed bloggy1982 closed 11 years ago

bloggy1982 commented 11 years ago

Hi, due to database problems I want to switch from mysql to flatfile. How can I do this? Are there any commands?

gmcferrin commented 11 years ago

In the latest dev build - /mcconvert flatfile

TfT-02 commented 11 years ago

Don't you mean /mcconvert database flatfile ?

bloggy1982 commented 11 years ago

Does not work! Tried both commands.

When doing " /mcconvert database flatfile " it says: Datebase migration complete: the SQL database now has all data from the flatfile database.

When doing " /mcconvert flatfile " it says: Proper usage is /mcconvert < database:experience > < linear:exponential >

I am using the latest dev build.

t00thpick1 commented 11 years ago

Switch your settings to Flatfile then while in game(Making sure the sql settings exist but aren't set to be used, type /mcconvert database mysql

bloggy1982 commented 11 years ago

It does not work. Flatfiles are still empty.

I set Mysql to false in config but entered the mysql settings as you said.

Here is my config file: http://pastebin.com/zqhWFuCC (of course I changed the real mysql values in fake values)

I am using the latest dev build of mcmmo.

gmcferrin commented 11 years ago

Welp, even if this error gets fixed, I at least know I have a usage string that needs updating...

TfT-02 commented 11 years ago

I would expect that the command would work like this: /mcconvert database <target_database>

So, if I was using MySQL and would want to use flatfile, I would have to switch my settings to flatfile and run /mcconvert database flatfile.

I believe we're currently doing it the otherway round. If this is the case, I think we should reconsider.

skyreacher commented 8 years ago

I just want to leave a comment for others who struggle to convert from SQL to flatfile. This is how I managed to actually migrate my data (done with mcMMO version 1.5.04):

  1. configre mcMMO to use the flatfile but make sure you have correct connection settings to the database in your config file.
  2. now something important which was not obvious to me first: the mcconvert command only migrates data for users who already exist in the flat file! This was my main issue. You must create entries for missing users in the flat file first, otherwise they won't be migrated. This could/should be improved in mcMMO, since it's a real pain to prepare the flat file manually. For each line in mcmmo.users you need the player's minecraft name and UUID.
  3. once the mcmmo.users flatfile is prepared, start the server up
  4. type mcconvert database sql on the server console to migrate the data from database to flatfile.

I hope this can help others who also want to migrate from database to flat file.

gerardvanschip commented 7 years ago

Hi guys. I have tried all suggestion, including skyreachers suggestion in adding user details, no dice. It wont migrate mysql data to the flatfile database. I really want to get this migrated. Anyone got any suggestions?

gerardvanschip commented 7 years ago

Btw, its /mcconvert database mysql to go from mysql to flatfile and /mcconvert database flatfile to go from flatfile to myql