SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Question error while importing *There is a chance that you may have found a bug in the SQL*

    Hi,
    I am trying to import database into myphpadmin, but the operation is aborted in middle with this error error.png i tried my localhost as well as other server but same error. how can i fix it?
    All those who wander aren't lost.

  2. #2
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,407
    Mentioned
    81 Post(s)
    Tagged
    3 Thread(s)
    Posting the sql code here would be a start.

  3. #3
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    for personal reason, i am not posting the code here. but its in pastebin.
    All those who wander aren't lost.

  4. #4
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,407
    Mentioned
    81 Post(s)
    Tagged
    3 Thread(s)
    for personal reason, i am not posting the code here.
    I can understand that nofel.

    Are you trying to input all that in one go? If so I would try breaking it down into smaller chunks to start with.

  5. #5
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    yes all in one go, if breaking down help, yes sure. but how?
    All those who wander aren't lost.

  6. #6
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,407
    Mentioned
    81 Post(s)
    Tagged
    3 Thread(s)
    You can do each individual create and insert on their own but that would take some time.
    I would delete all the inserts from the sql code and just run the create tables first and then do all the smaller inserts together and finally the big inserts on their own.

    This should work and if not it will narrow down where the problem is. There are also other options in phpmyadmin to ignore errors etc. but it is a while since I have used it.

  7. #7
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    while i paste queries (really long to copy and paste) into sql tab, in last 3rd i got this back
    #1062 - Duplicate entry '12' for key 'PRIMARY', how do i debug, the query is very long
    All those who wander aren't lost.

  8. #8
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,407
    Mentioned
    81 Post(s)
    Tagged
    3 Thread(s)
    In notepad++ or what ever you use it should display the code so that it is easier to read.
    As I say I have not done this for a while and I presume you have a primary key on one of the columns/rows and it is either the 12th one that is the problem or you have two keys with 12 as the content. So search for 12?

  9. #9
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Rubble View Post
    In notepad++ or what ever you use it should display the code so that it is easier to read.
    As I say I have not done this for a while and I presume you have a primary key on one of the columns/rows and it is either the 12th one that is the problem or you have two keys with 12 as the content. So search for 12?
    yes i have open in textedit, but so many 12, its crazy to search something like that,plus i am getting a lot of error which says "Duplicate entry '1' for key 'PRIMARY'", isn't there easy way to extract all create table command from a mix table, where its creating and inserting?
    All those who wander aren't lost.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •