MyBB Community Forums

Full Version: MyBB Merge 1062 - Duplicate entry '' for key 'username' problem.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I'm trying to merge 2x mybb forums into one but I always do get this error.
Anyone knows a solution?

Thank you in advance

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1062 - Duplicate entry '' for key 'username'
Query:
INSERT INTO mybb_users (`usergroup`,`additionalgroups`,`displaygroup`,`import_usergroup`,`import_additionalgroups`,`import_displaygroup`,`import_uid`,`username`,`password`,`salt`,`loginkey`,`email`,`regdate`,`lastactive`,`lastvisit`,`website`,`showsigs`,`signature`,`showavatars`,`timezone`,`avatardimensions`,`avatartype`,`avatar`,`lastpost`,`icq`,`aim`,`yahoo`,`skype`,`google`,`hideemail`,`allownotices`,`regip`,`lastip`,`language`,`passwordconvert`,`passwordconverttype`,`postnum`,`invisible`,`birthday`,`birthdayprivacy`,`subscriptionmethod`,`receivepms`,`receivefrombuddy`,`pmnotice`,`pmnotify`,`showquickreply`,`ppp`,`tpp`,`daysprune`,`timeformat`,`dst`,`buddylist`,`ignorelist`,`style`,`away`,`awaydate`,`returndate`,`referrer`,`referrals`,`reputation`,`timeonline`,`showcodebuttons`,`totalpms`,`unreadpms`,`pmfolders`,`notepad`,`threadmode`,`showredirect`,`dateformat`,`dstcorrection`,`warningpoints`,`moderateposts`,`moderationtime`,`suspendposting`,`suspensiontime`,`suspendsignature`,`suspendsigtime`,`coppauser`,`classicpostbit`,`loginattempts`,`usernotes`,`showimages`,`showvideos`,`threadnum`,`usertitle`,`buddyrequestspm`,`buddyrequestsauto`,`awayreason`,`sourceeditor`) VALUES (2,'',0,2,'',0,11,'','','','','[email protected]',1384185536,1403269769,1403250935,'',1,'',1,'2','100|98','upload','./uploads/avatars/avatar_11.png?dateline=1388826568',1397073945,'0','','','','',0,1,X'50a79a5a',X'50a79a5a','english','','',524,0,'','all',0,1,0,1,0,1,0,0,0,'0',0,'1','',0,0,0,'0',0,1,0,237139,1,116,0,'1**Inbox$%%$2**Sent Items$%%$3**Drafts$%%$4**Trash Can','','linear',1,'0',2,0,0,0,0,0,0,0,0,0,1,'',1,1,'16','','1','0','','0')
You shouldn't post your password hash, salt and loginkey. I've removed them for you.

Which encoding have you selected and how are your databases encoded? An empty username usually indicates that one of those settings is wrong.
Hello it says utf8mb4_general_ci for the tables of first forum and utf8_general_ci for the tables of second forum.
Is that what you're asking for?
Yeah, exactly. And which is the forum which you're trying to merge? The utf8mb4 into the utf8 one?
Nope it was the utf8 trying to merge to utf8mb4 but I just fixed it with your hint Smile
First of all changed the tables of both forums to utf8mb4 and in merge system from encoding menu I just choose the option 4byte utf8 and it just merged successfully.

Thank you so much for your help Smile