Results 1 to 17 of 17
  1. #1
    ABW Ambassador bettylou's Avatar
    Join Date
    December 27th, 2005
    Location
    Indiana
    Posts
    595
    Where, oh where did my databases go......
    Hi guys,

    A few day ago I noticed that one of my sites was getting a lot of clicks from Adwords this month but no sales, so I thought that I would check the database to see what my clickthrough table looked like. Well, the entire database was empty -- the actual database was still there just no tables. I wasn't getting any sales from the sites that I have as subdomains of this site either (not really that unusual though), so I looked at those databases as well and, while they weren't entirely wiped out, the tables were still there -- most of them were emptied and a couple were still fine.

    This is probably an incredibly stupid question but could this have only happened from hacking? Are there any other things that could have happened to wipe out these databases? I contacted my host and they said they have no way of knowing what happened. Luckily, I have backups so I can restore them but I want to keep this from happening again.

    Thanks for any suggestions.

  2. #2
    Comfortably Numb John Powell's Avatar
    Join Date
    October 17th, 2005
    Location
    Bayou Country, LA
    Posts
    3,432
    Well, the entire database was empty -- the actual database was still there just no tables.
    Could you elaborate on your setup. Like how is your database updated?


  3. #3
    ABW Ambassador bettylou's Avatar
    Join Date
    December 27th, 2005
    Location
    Indiana
    Posts
    595
    Hi bumpaw,

    The main domain's database is updated with php files that get the newest feeds from the merchant. I have used these same files for over a year and half without any problems. These files update each merchant's individual table.

    The other databases for each of the subdomains are not set up to update automatically and, in all honesty, I haven't updated them for a while.

  4. #4
    Comfortably Numb John Powell's Avatar
    Join Date
    October 17th, 2005
    Location
    Bayou Country, LA
    Posts
    3,432
    Well, the entire database was empty -- the actual database was still there just no tables.
    I was thinking that your script might have been written to empty the old data before checking for the new. In that case you could loose data if the connection to the source failed, but this is probably not the case if you have tables with missing data that have not been updated. Sorry I'm not more help.


  5. #5
    ABW Ambassador bettylou's Avatar
    Join Date
    December 27th, 2005
    Location
    Indiana
    Posts
    595
    Thanks for trying though.

    Whoa! I thought that I had wrongly addressed you as bumpaw but that must just be your stage name.

    Thanks again.

  6. #6
    Moderator
    Join Date
    April 6th, 2006
    Posts
    2,689
    I'm assuming this is a shopping site, where products are displayed.. if not, pls ignore!

    It depends on the application used to updated the database - most apps will empty tables first (not delete them), then import a fresh data file. If a datafeed changes, even just one column, your table will remain empty, ie. import fails.

    I'm a little puzzled though.. wouldn't your site be empty then..? It's something that would have been apparent on the site itself (ie. no products found).

    When you say that you have backup, that would be the old products tho. Have you tested an import manually to see the results..? You may have this problem again even after restoring backup..

    Hope this helps!

  7. #7
    Comfortably Numb John Powell's Avatar
    Join Date
    October 17th, 2005
    Location
    Bayou Country, LA
    Posts
    3,432
    Whoa! I thought that I had wrongly addressed you as bumpaw but that must just be your stage name.
    I just changed into my real name about 2 minutes before your post. Kinda weird feeling.


  8. #8
    ABW Ambassador Snib's Avatar
    Join Date
    January 18th, 2005
    Location
    Virginia
    Posts
    5,303
    Yeah, what teezone said. If your import script deletes product rows and then inserts that is likely the problem. It might have deleted all the products and failed on the import, thus no products. That's why its never a good idea to delete from a database and re-insert. You should always retain all your data and update your existing rows rather than remove them.

    This is a long shot but it could also be SQL injection. If your PHP code is insecure some malicious user could append a "delete from table" query to one of your URL's to cause everything to get wiped out. But this isn't very likely.

    - Scott
    Hatred stirs up strife, But love covers all transgressions.

  9. #9
    ABW Ambassador bettylou's Avatar
    Join Date
    December 27th, 2005
    Location
    Indiana
    Posts
    595
    Yeah, I could accept that for the individual merchant and product tables but all tables are gone -- categories, coupons, lookup tables, and the import scripts don't do anything with those tables. And with almost all of my database tables for the subdomains being emptied as well (that do not update automatically), I am just a little perplexed as to how this could happen unless there was something with Hostgator's server but they adamantly say that they have no idea what happened.

    teezone,
    Yes, the sites were void of products but, and I know this is bad, but I have been working on another site and I didn't even realize until I took a look at my databases. That will teach me a lesson, I guess.

  10. #10
    ABW Ambassador bettylou's Avatar
    Join Date
    December 27th, 2005
    Location
    Indiana
    Posts
    595
    And for what this may be worth, I took a look to see when the tables were showing that they were last updated and all the tables in all databases show that they were created and last updated on October 1st, 2008 between 8:57am and 9:00am. So obviously this is the time when whatever it was occurred.

  11. #11
    ABW Ambassador Snib's Avatar
    Join Date
    January 18th, 2005
    Location
    Virginia
    Posts
    5,303
    bettylou,

    Were the tables completely gone or were they just empty? Are you using some software like OSCommerce or Zen Cart where users are aware of the table names. Because if this was an injection attack they would have to know the names of all your tables in order to drop or empty them. Another possibility is the tables crashed and need to be repaired.

    - Scott
    Hatred stirs up strife, But love covers all transgressions.

  12. #12
    ABW Ambassador bettylou's Avatar
    Join Date
    December 27th, 2005
    Location
    Indiana
    Posts
    595
    In one of the databases, the tables were totally gone -- with the exception of the individual merchant tables that were recreated by the import script. In the other databases, that don't auto update, the tables were emptied with the exception of one table that wasn't emptied entirely just partially.

    I don't have any type of cart program for these sites. I was wondering about a SQL injection also but I don't see how it would be possible and to be across all databases. Although, curiously enough, I have WP blogs on a couple of these sites and they were unharmed, so maybe somehow someone got in but the WP databases have better protection than my own coding. I try to write code to be secure but I am not wise to all the ways of the evil ones.

  13. #13
    ABW Ambassador Snib's Avatar
    Join Date
    January 18th, 2005
    Location
    Virginia
    Posts
    5,303
    If your access logs go that far back you might want to check them. Look for keywords like "delete" or "drop".

    - Scott
    Hatred stirs up strife, But love covers all transgressions.

  14. #14
    ABW Ambassador bettylou's Avatar
    Join Date
    December 27th, 2005
    Location
    Indiana
    Posts
    595
    Thanks Snib, I already tried that and they only show one day.

    Thanks for all you input, as well as everyone else's, I do appreciate it.

  15. #15
    ABW Ambassador Bob Lawrence's Avatar
    Join Date
    July 2nd, 2007
    Posts
    1,090
    Not to steal your thread,
    Was you by chance using soholaunch on this site?
    Because I just had a site too Wednesday Nite or Thursday Morning that got shut down because of CPU usage and the site really hadn't been modified since the last update of Soholaunch.
    Also wasn't at Hostgator at the time.

  16. #16
    ABW Ambassador bettylou's Avatar
    Join Date
    December 27th, 2005
    Location
    Indiana
    Posts
    595
    Quote Originally Posted by bobs-pcmall.com
    Not to steal your thread,
    Was you by chance using soholaunch on this site?
    Because I just had a site too Wednesday Nite or Thursday Morning that got shut down because of CPU usage and the site really hadn't been modified since the last update of Soholaunch.
    Also wasn't at Hostgator at the time.
    No, I wasn't using this. Actually, I don't even know what that is. Did you lose your data?

    I guess I am just concerned because I am working on a site for my hometown and I would hate to lose any of that data, even just one day's worth of it. They would run me out of town.

  17. #17
    ABW Ambassador Bob Lawrence's Avatar
    Join Date
    July 2nd, 2007
    Posts
    1,090
    Its a CMS program, that you can embed js, php scripts into.
    Can't tell if the database was emptied, the hosting company as I won't name, wiped the site clean except for the backup.

  18. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. 50% off in all databases
    By pachecus in forum Midnight Cafe'
    Replies: 1
    Last Post: June 12th, 2006, 10:54 AM
  2. 2 databases on one page
    By Gordon in forum Programming / Datafeeds / Tools
    Replies: 6
    Last Post: July 25th, 2005, 09:15 PM
  3. Using ASP, but need help with databases
    By bcorso in forum Programming / Datafeeds / Tools
    Replies: 1
    Last Post: August 19th, 2003, 03:30 AM
  4. MS Access Databases
    By Taurus in forum Programming / Datafeeds / Tools
    Replies: 24
    Last Post: January 22nd, 2002, 01:58 PM

Posting Permissions

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