MySQL - Anyway to read it?

Discussion in 'PHP' started by EGS, Dec 12, 2005.

  1. #1
    Hi,

    I recently backed up a MySQL Database for one of my websites, and like right after that, I added two articles to my site. Upon doing so, though, I accidently deleted an article of mine!

    I know the MySQL file I downloaded to backup my database still has the article within the file somewhere. It's a gZipped file, and I was wondering if there was any way that I could read the content within that file?

    I tried opening the .gz file up in NotePad, but all these strange characters plopped up. I don't want to replace my database, I just want to retrieve one article. Anyway I can do this with a program or something without going online?

    Thanks.
     
    EGS, Dec 12, 2005 IP
  2. tflight

    tflight Peon

    Messages:
    617
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    0
    #2
    How did you perform the backup? It could have been backed up in a variety of formats depending on the technique or script you used.
     
    tflight, Dec 12, 2005 IP
  3. zak

    zak Peon

    Messages:
    175
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #3
    recreate the database on a test machine
    export the article you need to into a new sql file
    upload the new file to the database with the missing article
     
    zak, Dec 12, 2005 IP
  4. forkqueue

    forkqueue Guest

    Messages:
    401
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #4
    If it's just one or two lines you could always use zless to browse the file, then copy + paste.
     
    forkqueue, Dec 12, 2005 IP
  5. profs77

    profs77 Well-Known Member

    Messages:
    441
    Likes Received:
    39
    Best Answers:
    0
    Trophy Points:
    118
    #5
    What you need to do is download an operating system known as knoppix. Its a bootable linux distribution that boots directly off the CD. Search google for "knoppix iso" or find a magazine at a bookstore or Fry's Electronics. Boot into knoppix by putting the cd in the drive before the computer starts up. You may have to press delete to enter setup and change the boot device order so you can boot from the CD. Once your in, you should be able to open up the file with the archiving tool availible.
     
    profs77, Dec 12, 2005 IP
  6. LGRComp

    LGRComp Well-Known Member

    Messages:
    516
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    195
    #6
    ok this is really easy...you don't need to download a Linux operating system to do it, but you do need a tool to read the .gz format.

    1. Download and install 7zip (http://www.7-zip.org/)
    2. Open to folder that your backup is in and right click the file and choose "Extract to...". You can choose another extract option but this will create a new folder.
    3. Open the folder that you just extracted the file to.
    4. It might still be in a tar ball. It will have a .tar extenstion. If so right click the .tar file and choose "Extract Here". This will untar the file in the present folder.
    5. Once that is done you will have to find the MySql data and then you should be able to open it up in a text editor and find the record you lost.

    6. If you don't want all that hassle PM me and I will give you my email and I can do it for you and email you back the MySql file in plain text format.

    7. Good Luck.
     
    LGRComp, Dec 12, 2005 IP
  7. EGS

    EGS Notable Member

    Messages:
    6,078
    Likes Received:
    438
    Best Answers:
    0
    Trophy Points:
    290
    #7
    7-Zip! I forgot about that - I had that installed on my old machine!
    I believe that I can just decompress it through there and I hear if you save it as a .doc file (or .rtf), I'll be able to read it!

    I'll see if this works. Thanks man!:D
     
    EGS, Dec 13, 2005 IP
  8. EGS

    EGS Notable Member

    Messages:
    6,078
    Likes Received:
    438
    Best Answers:
    0
    Trophy Points:
    290
    #8
    Success.
    Thanks a bunch, man!:D
     
    EGS, Dec 13, 2005 IP
  9. execute

    execute Peon

    Messages:
    301
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #9
    winrar owns.
     
    execute, Dec 13, 2005 IP