Why are records disappearing from MySql tables?

Discussion in 'MySQL' started by Darden12, Aug 3, 2011.

  1. #1
    I use about 10 different tables with my website from a couple different MySql databases. Every now and then (about once a week, sometimes more) I notice that one of the tables has lost over half of its records overnight (sometimes more, occasionally less).

    I don't know why this is happening or how to prevent it. These are tables that I am currently doing no work in as far as writing or modifying scripts to access
    them.

    None of the tables in the affected databases are accessible via an online form so I assume it can't be an injection attack, and I have placed the log-in php script below the public directory in the cgi-bin folder (which, under this shared hosting environment, is the only place below the main directory that I know
    to place it).

    How can I investigate what's going on?

    My ISP is no help: They just keep telling me that the problem is not on their end.

    Any suggestions on tracking down what's going on? I thought there was a log somewhere to check transactions affecting a database, but I have not yet been able to find it.

    Thanks for any ideas on diagnosing and fixing this problem.

    Brian
     
    Darden12, Aug 3, 2011 IP
  2. nakulkhandelwal

    nakulkhandelwal Member

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #2
    The cause could be anything. It's unclear. But still,

    1. Try changing your database passwords and also review the privileges set.

    2. Backup your database regularly using CRON scripts or other methods to backup database periodically.
     
    nakulkhandelwal, Aug 4, 2011 IP
  3. Darden12

    Darden12 Well-Known Member

    Messages:
    107
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #3
    Thanks for the feedback.


    I'm already backing up the databases nightly since I first noticed this problem. I have tried changing passwords once. I haven't looked into privileges settings yet, so I guess I'll try that next.

    Thanks,
    Brian
     
    Darden12, Aug 5, 2011 IP