Database Migration - kyngs/LibreLogin GitHub Wiki

Migrations implemented

If your old plugin is not supported (yet), please register as some random user with the password "testpassword", and then send me the MySQL DB row of that player to my PMs on Discord.

  • JPremium SHA256
  • AuthMe BCrypt
  • AuthMe SHA256
  • Aegis BCrypt
  • DynamicBungeeAuth SHA512
  • JPremium BCrypt
  • YourOldPlugin Here

Migration

This is a quick guide to explain how to migrate databases

Locate the following section in config.conf and fill it out:

# This is used for migrating the database from other plugins.
# Please see the wiki for further information: https://github.com/kyngs/LibreLogin/wiki/Database-Migration
migration {
    old-database {
        mysql {
            # The name of the database.
            database=librelogin
            # The host of the database.
            host=localhost
            # The maximum lifetime of a database connection in milliseconds. Don't touch this if you don't know what you're doing.
            max-life-time=600000
            # The password of the database.
            password=""
            # The port of the database.
            port=3306
            # The table of the old database.
            table=user-data
            # The user of the database.
            user=root
        }
        sqlite {
            # Path to SQLite database file. Relative to plugin datafolder.
            path="user-data.db"
        }
    }
    # Migrate the database on the next startup.
    on-next-startup=false
    # The type of the migration. Available Types:
    # jpremium-mysql - Can convert from MySQL JPremium SHA256 and BCrypt
    # authme-mysql - Can convert from MySQL AuthMe BCrypt and SHA256
    # authme-sqlite - Can convert from SQLite AuthMe BCrypt and SHA256
    # aegis-mysql - Can convert from MySQL Aegis BCrypt
    # dba-mysql - Can convert from MySQL DynamicBungeeAuth, which was configured to use SHA-512
    # librelogin-mysql - Can convert from MySQL LibreLogin, useful for migrating to a different database
    # librelogin-sqlite - Can convert from SQLite LibreLogin, useful for migrating to a different database
    type=authme-sqlite
}

After you do this, restart the proxy, on startup, you should see status messages in the log.

After the migration is complete, shut down the proxy and set on-next-startup to false.

Now all of your data should be migrated, if something goes wrong, open up an issue.