Migrate from xAuth to AuthMe
Migrate from xAuth to AuthMe
You can use a tool like MySQL Workbench to exceute all the SQL Queries listed here.
The recommended way
The recommended way is to create a new database and copy the needed data from the xAuth database.
- Create a new database for AuthMe with the name "authme".
- Create this table in that database:
CREATE TABLE `authme` ( `id` INTEGER AUTO_INCREMENT, `username` VARCHAR(255) NOT NULL, `password` VARCHAR(255) NOT NULL, `ip` VARCHAR(40) NOT NULL, `lastlogin` BIGINT, CONSTRAINT `table_const_prim` PRIMARY KEY (`id`));
- Copy all the needed data from the xAuth database to the AuthMe database with:
Note that the name of "xAuthDataBase" and "accounts" depends on your configuration
INSERT INTO `authme`.`authme` (username,password,ip) SELECT `playername`, `password`, `lastloginip` FROM `xAuthDataBase`.`accounts`;
- Edit AuthMe's config.yml to use mysql and set the proper mysql username/password
The quick & dirty way
You can also configure AuthMe to use the xAuth database directly. But as AuthMe is also writing into that database it is possible that xAuth can't use that database anymore.
- Open AuthMe's config.yml and edit those settings:
DataSource: backend: mysql mySQLDatabase: xauth # or whatever name your xauth database has mySQLTablename: accounts # look in your xauth config you might have changed the name of the table there mySQLColumnName: playername mySQLColumnPassword: password mySQLColumnIp: lastloginip
- Dont forget to set the proper MySQL username/password
Comments