1

I am trying to upload sql file by BigDump

sql file size is 766MB (784616 KB)

I have try more then 10 time also increase mx size etc. But got same error.

Error at the line 2134851: (1815, 95, 1);

Query: --
--
INSERT INTO `access` (`userid`, `forumid`, `accessmask`) VALUES
(1815, 95, 1)

MySQL: Duplicate entry '1815-95' for key 'PRIMARY'

File size is too large so i can't open this in any editor , So any help regarding this? So i can skip this line .

Also if bigdump stop one this line and next time can i start from this link or i must need to delete all tables and it will start from "0".

Thanks

Mr Shabir
  • 173
  • 3
  • 16
  • You should be able to edit a 750M file in an editor, it will just take a while :-) I've edited files in excess of 2GB in Vim, for example... In any case, you could also use `sed(1)`, or somesuch... – Martin Tournoij Dec 15 '14 at 15:39
  • 1
    Well, *Duplicate entry '1815-95' for key 'PRIMARY'* is a rather straightforward message and doesn't mention anything about file size. You've designed your table so it cannot hold duplicates in columns `userid`, `forumid` and now you're trying to violate such restriction. – Álvaro González Dec 15 '14 at 15:40
  • 1
    You could always import into a table without the constraint then modify the record after and re-apply the constraint. – Dreamwalker Dec 15 '14 at 15:41

1 Answers1

0

Drop the primary key in the table. (See Remove Primary Key in MySQL). Then find duplicates in the table using group by and count and remove them. Then add the primary key constraint back in.

Community
  • 1
  • 1
dan b
  • 1,172
  • 8
  • 20