MYSQL Error 1062 duplicate entry Help menu

Shout-Out

User Tag List

Results 1 to 9 of 9
  1. #1
    houseplant2's Avatar Active Member
    Reputation
    50
    Join Date
    Feb 2007
    Posts
    195
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MYSQL Error 1062 duplicate entry Help

    I could use some info. im importing info with navicat from an xcell file ad keep getting error 1062 duplicate entry '255' for key 1. I dont understand why im getting this error. The index numbers are different. i tried making them higher and still get this error. I tried copy and pasting the info in and still get the error. obviosly im just not seeing the problem. any help would be appreciated. thanks.

    here is the error log:

    [2009-02-17 05:08:45] [Msg] Import start
    [2009-02-17 05:08:45] [Msg] Import type - Excel file
    [2009-02-17 05:08:45] [Msg] Import from - C:\WOM\New Folder\New Folder\n-playercreateinfo.xls
    [2009-02-17 05:08:45] [Msg] Import table [playercreateinfo]
    [2009-02-17 05:08:45] [Err] 1062 - Duplicate entry '255' for key 1
    [2009-02-17 05:08:45] [Err] insert into `playercreateinfo` (`Index`,`race`,`factiontemplate`,`class`,`mapID`,`zoneID`,`positionX`,`position Y`,`positionZ`,`displayID`,`BaseStrength`,`BaseAgility`,`BaseStamina`,`BaseIntel lect`,`BaseSpirit`,`BaseHealth`,`BaseMana`,`BaseRage`,`BaseFocus`,`BaseEnergy`,` attackpower`,`mindmg`,`maxdmg`) values ('0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0' ,'0','0','0'),('500','55','5','1','0','85','1676.35','1677.45','121.67','60330', '22','18','23','18','25','70','0','1000','0','0','27','4','5'),('501','55','5',' 2','530','3430','10349.6','-6357.29','33.4026','60330','19','22','20','24','20','38','140','1000','0','100', '21','4','4'),('502','55','5','3','1','14','-618.518','-4251.67','38.718','60330','21','25','22','16','22','66','81','0','0','0','16','5 ','7'),('503','55','5','4','0','85','1676.35','1677.45','121.67','60330','20','2 1','22','18','25','65','0','0','0','100','30','4','4'),('504','55','5','5','0',' 85','1676.35','1677.45','121.67','60330','19','18','21','20','28','62','130','0' ,'0','0','30','4','4'),('505','55','5','7','1','14','-618.518','-4251.67','38.718','60330','22','22','22','17','23','67','72','0','0','0','30','4 ','4'),('506','55','5','8','0','85','1676.35','1677.45','121.67','60330','19','1 8','21','21','27','62','135','0','0','0','30','4','4'),('507','55','5','9','0',' 85','1676.35','1677.45','121.67','60330','19','18','22','20','27','63','110','0' ,'0','0','30','4','4'),('508','55','5','11','1','215','-2917.58','-257.98','52.9968','60330','26','15','22','17','24','74','67','0','0','0','30','4 ','4')
    [2009-02-17 05:08:45] [Msg] Processed:10, Added:0, Updated:0, Deleted:0, Errors:10
    [2009-02-17 05:08:45] [Msg] Finished - Unsuccessfully

    MYSQL Error 1062 duplicate entry Help
  2. #2
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    It means something with that entry is already there. Either delete the playercreateinfo that already has that or use a different entry.

  3. #3
    houseplant2's Avatar Active Member
    Reputation
    50
    Join Date
    Feb 2007
    Posts
    195
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i tried using different entries and got the same results....its like it gets to the 255 mark and hits a wall. is there a limit to the number of entries i can have in the database? can i change it if there is? im 100% sure there are no index numbers that are the same. i have quadruple checked it.

  4. #4
    waymirec's Avatar Member
    Reputation
    49
    Join Date
    Jan 2008
    Posts
    155
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check your table schema and make sure your Index field didn't somehow get set to a tinyint.

  5. #5
    houseplant2's Avatar Active Member
    Reputation
    50
    Join Date
    Feb 2007
    Posts
    195
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    AH-HA! i think you are right...But it wont let me change it? under the tables@information_schema the number of rows is set to 245. i can highlight it but it wont let me type anything in...how do i change that?

    EDIT:
    Ok Yea I really have no idea what im doing...I was just looking at another databases creation sql and see tinyint(3) for the index. can i re-create the table and set the tinyint to something larger? how do i fix this?
    Last edited by houseplant2; 02-17-2009 at 02:23 PM.

  6. #6
    Vindicated's Avatar Contributor
    Reputation
    226
    Join Date
    Aug 2008
    Posts
    1,067
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Right click the table name and choose design to change the column type to something bigger/smaller


  7. #7
    houseplant2's Avatar Active Member
    Reputation
    50
    Join Date
    Feb 2007
    Posts
    195
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    rock on! thanks it worked great!

  8. #8
    waymirec's Avatar Member
    Reputation
    49
    Join Date
    Jan 2008
    Posts
    155
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're welcome. As an FYI when I said to check your "schema" I wasn't referring to the information_scheme database. If you execute a "describe playercreateinfo" it will show you the schema for that table and indicate whether Index is an tinyint or int, which can then be changed via a GUI tool as explained above or by executing a mysql "alter table" command (i.e. ALTER TABLE playercreateinfo MODIFY `Index` int unsigned not null auto_increment). Another thing to consider is that should you update your databse in the future you may need to reapply that change as the database is designed with a tinyint, most likely becuase it should never have more than 255 records in it.

  9. #9
    houseplant2's Avatar Active Member
    Reputation
    50
    Join Date
    Feb 2007
    Posts
    195
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok thank you. i can now add more records but its got some other problems apperently. starting characters have items they shouldnt and spells and skills they shouldnt. this is before i even enter in starting items skills ans spells for that race. I usually login before i do all that just to see it works ok. its confusing and i dont know if its a database limitation or a core limitation. i guess 26 races is all i will be able to have for the time being. I was just not expecting to hit this wall. if someone has an idea i would love to hear them but otherwise im frustrated with it for the moment. thanks for all the help.

Similar Threads

  1. [Help] Mysql error when I start server up.
    By Menthol8 in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 04-11-2008, 04:25 PM
  2. [HELP] mySQL error on install
    By 1ns0mnia in forum World of Warcraft Emulator Servers
    Replies: 11
    Last Post: 04-08-2008, 02:09 PM
  3. Ascent/LogOnServer/MySQL - Error message - Need help!
    By Habakka in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 02-21-2008, 12:56 PM
  4. [HELP] mysql error
    By styZz in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 02-19-2008, 01:30 PM
  5. Need Help, MySQL Error
    By Maree in forum WoW EMU Guides & Tutorials
    Replies: 1
    Last Post: 01-27-2008, 06:45 PM
All times are GMT -5. The time now is 02:53 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search