There is a constraint that needs to be changed in the clients_to_realms table
mysql> show create table clients_to_realms;
...
UNIQUE KEY `ClientID` (`ClientID`),
UNIQUE KEY `RealmID` (`RealmID`)
...
- Can be fixed with the following lines
alter table clients_to_realms drop index ClientID;
alter table clients_to_realms drop index RealmID;
alter table clients_to_realms add UNIQUE(`ClientID`, `RealmID`);