1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Working with Large SQL Dumps

Discussion in 'MySQL' started by Anduril66, Jan 20, 2007.

  1. #1
    I have a large (1.5 gb) Sql dump of an article accessory. I would like to work on the SQL and remove most of the articles before I upload it to my webserver. What is the best way to edit a file you cannot open because it is bigger than your memory. Also, is there any utilities you can use to edit a SQL dump without uploading the SQL to a webserver?

    Thanks
     
    Anduril66, Jan 20, 2007 IP
  2. redwine

    redwine Active Member

    Messages:
    349
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #2
    you install sql server locally and use SQL queries to delete rows instead of editing sql dump file. This is how i manage 10GB database. I dont make sql dump as it takes too long. I just gzip and copy the mysql database folder to my remote backup server.
     
    redwine, Jan 20, 2007 IP
    Anduril66 likes this.
  3. kogepan

    kogepan Peon

    Messages:
    280
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Im having the same problem. Since i purchased an article database as well..
     
    kogepan, Jan 20, 2007 IP
  4. Anduril66

    Anduril66 Well-Known Member

    Messages:
    390
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    108
    #4
    Yeah I bought that 277 000 article database and I am trying to extract the finance articles, but I'm pretty new to databases.

    Thanks for the help redwine. I installed Apache and MySQL on my Windows desktop machine. But right now, I only have access to the SQL dump and not the database, because I downloaded the SQL dump from another user. I'm having trouble creating the database. I tried renaming the dump "articles" and I put "articles" in my mysql bin directory, and I tried "source articles;" but I got a "Failed to open file, error: 2", and I'm not really sure what I'm doing.
     
    Anduril66, Jan 20, 2007 IP
  5. kogepan

    kogepan Peon

    Messages:
    280
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #5
    right now im trying to split the file then manually insert it into mysql we'll seee what happen :)
     
    kogepan, Jan 20, 2007 IP
  6. YIAM

    YIAM Notable Member

    Messages:
    2,480
    Likes Received:
    240
    Best Answers:
    0
    Trophy Points:
    280
    #6
    I will suggest you do download WAMP. Its includes MySQL, Apache, PHP and also phpMyAdmin.

    With phpMyAdmin you can do it in minutes.
     
    YIAM, Jan 20, 2007 IP
  7. Anduril66

    Anduril66 Well-Known Member

    Messages:
    390
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    108
    #7
    Oh yeah, I did download WAMP and tried to Import the SQL, but the operation broke because the file was so large. Do I have to split the dump?
     
    Anduril66, Jan 20, 2007 IP
  8. adam1987

    adam1987 Well-Known Member

    Messages:
    714
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    110
    #8
    adam1987, Jan 20, 2007 IP
  9. kogepan

    kogepan Peon

    Messages:
    280
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #9
    ya i tried that file it worked like a charm until my host gave me this max_questions resources error.... im outa luck.
     
    kogepan, Jan 20, 2007 IP
  10. adam1987

    adam1987 Well-Known Member

    Messages:
    714
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    110
    #10
    yea i had that trouble before , in the end i had to open the sql file in notepad and split it into about 5
     
    adam1987, Jan 20, 2007 IP
  11. Clive

    Clive Web Developer

    Messages:
    4,507
    Likes Received:
    297
    Best Answers:
    0
    Trophy Points:
    250
    #11
    Were you actually able to open the sql? How big was it? Those with the 277,000 articles sql will not be that lucky to use this advice since the file is larger than what Notepad can open. the BigDump script has helped me..
     
    Clive, Jan 20, 2007 IP
  12. phantomddl

    phantomddl Well-Known Member

    Messages:
    2,856
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    160
    Articles:
    15
    #12
    there is an easier way, dont waste your time with it
    first download this: http://www.ozerov.de/bigdump.zip
    then edit the script (database settings)
    then upload the sql into ftp, and chmod the folder 777
    then go to bigdump.php you will see sql file there, click import
    thats all :)

    edit: oops sorry, i didnt see, it was given
     
    phantomddl, Jan 20, 2007 IP
  13. kogepan

    kogepan Peon

    Messages:
    280
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #13
    i cant even open the sql sadly. :(
     
    kogepan, Jan 20, 2007 IP
  14. Clive

    Clive Web Developer

    Messages:
    4,507
    Likes Received:
    297
    Best Answers:
    0
    Trophy Points:
    250
    #14
    Clive, Jan 20, 2007 IP
  15. ashiezai

    ashiezai Peon

    Messages:
    927
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #15
    ashiezai, Jan 20, 2007 IP
  16. Clive

    Clive Web Developer

    Messages:
    4,507
    Likes Received:
    297
    Best Answers:
    0
    Trophy Points:
    250
    #16
    Did that. I even suggested this option myself a few posts above.
    Only it looks like the guy is unsure which to try, so I insisted by sending him there again, repeating myself and others..
    Simply because it's a working solution and is worth taking a look at.
     
    Clive, Jan 20, 2007 IP
  17. everypcneed

    everypcneed Peon

    Messages:
    238
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #17
    For those of you having issues opening large sql dumps try downloading PSPad Editor from http://www.pspad.com/en/download.php

    I never had an issue opening an sql dump file with this editor to date and I have had to work with some latge sql dumps.
     
    everypcneed, Jan 21, 2007 IP
  18. ShiftChip

    ShiftChip Well-Known Member

    Messages:
    365
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    110
    #18
    I also have the same DB

    I used: JASP (Just Another file Split Program)
    http://www.freedownloadscenter.com/Utilities/File_Splitting_Utilities/JASP___Just_Another_File_Split_Program.html
    I'm sure there is better file split programs tho...
     
    ShiftChip, Jan 25, 2007 IP
  19. technoguy

    technoguy Notable Member

    Messages:
    4,332
    Likes Received:
    299
    Best Answers:
    0
    Trophy Points:
    205
    #19
    if you want to open your file then use ltfviewer to view your file.
     
    technoguy, Jan 28, 2007 IP
    nQQb likes this.
  20. nQQb

    nQQb Active Member

    Messages:
    332
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #20
    thank you technoguy, your post was helpful to me.
     
    nQQb, Jan 20, 2008 IP