merged 2 databases help undoing it

Discussion in 'MySQL' started by lenney, Mar 12, 2009.

  1. #1
    i merged my website with a database i purchased and few weeks goes on ive now found the database was a hacked database i need to remove it

    can any 1 help some 1 told me

    export all the email addresses in the second database, then write a command for MySQL that drops all rows containing those email addresses in the member tables, and also reference the email addresses to the member numbers, then drop rows containing those member numbers

    can any 1 help please?
     
    lenney, Mar 12, 2009 IP
  2. plog

    plog Peon

    Messages:
    298
    Likes Received:
    11
    Best Answers:
    1
    Trophy Points:
    0
    #2
    Can you provide a copy of the hacked database and of the current table you need fixed? If so I could look at it and see exactly what it will entail.

    Provide either a spreadsheet or a comma seperated text file.
     
    plog, Mar 12, 2009 IP
  3. lenney

    lenney Well-Known Member

    Messages:
    462
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    103
    #3
    yes i have a copy of the database its quite big tho 50mb zipped and its not a table its a whole database

    my website had 16k members and i merged and got 68k members and a hell of a lot of posts
     
    lenney, Mar 12, 2009 IP
  4. plog

    plog Peon

    Messages:
    298
    Likes Received:
    11
    Best Answers:
    1
    Trophy Points:
    0
    #4
    How many tables total?

    If you could export and zip it to me I would be willing to give it a look. Give me the entire database I will see if I can make sense of it and discern the ones that need to be deleted, if not I might have some questions.

     
    plog, Mar 12, 2009 IP
  5. lenney

    lenney Well-Known Member

    Messages:
    462
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    103
    #5
    it is way 2 big to be downloading and stuff ill just leave it i think its about 200mb with all topics and posts
     
    lenney, Mar 12, 2009 IP
  6. mmerlinn

    mmerlinn Prominent Member

    Messages:
    3,197
    Likes Received:
    819
    Best Answers:
    7
    Trophy Points:
    320
    #6
    Just throw the merged database away and use the backup copy of your old database.
     
    mmerlinn, Mar 13, 2009 IP
  7. lenney

    lenney Well-Known Member

    Messages:
    462
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    103
    #7
    then i loose like 3000 members ive got since then
     
    lenney, Mar 14, 2009 IP
  8. timarcher52

    timarcher52 Peon

    Messages:
    62
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    You'll probably be stuck evaluating each table. Perhaps load in a set of tables that only have the data you "merged in". Then you'll write a query on each table finding all rows in your production database that match a row in the merged DB, and then deleting it. Yes it will be painstaking and tedious. You may get lucky and in your specific DB tables have a timestamp or another field you can key off of and look at everything loaded between a specific time period or by a specific userid/application. If you're lucky enough to have that then deleting the data may be easier.
     
    timarcher52, Mar 15, 2009 IP