Nov 21, 2009

Database Tables Gone?

free web hosting
Open Discussion & Free Web Hosting > Astahost > Hosted Members Support

Database Tables Gone?

minnieadkins
I wrote a simple web program/site in php that uses mysql as its database. The program stores a daily record of calories/serving. It's basically a calorie chart. I looked today and 2 of my tables were missing. Now considering it only uses 2 tables (which isn't too efficient but it's for personal use) that's a lot missing. It's not a big deal to lose the data and I didn't have a backup, but I'm just curious as to why and how it happened.

Everything worked fine for awhile, then I decided to dabble with cronjobs. I wrote a cron to make sure that the day has been recorded into the database, that way it can still go back and be edited (and keeps the current dietday # intact).

Now I am a complete 'newbie' to crons, but I'm pretty sure it's written correctly. Perhaps I messed up somehow and did the cron incorrect. I tested it however, and it seemed to work.

The problem is that I do not have any 'DROP' sql syntax in my scripts. I'm just curious as to how this could happen? Any ideas, comments/solutions and or laughing at my stupidity is greatly appreciated.

 

 

 


Comment/Reply (w/o sign-up)

Chesso
Well short of someone going in there and removing it or somehow using a php script to do so I really don't know why that would happen.....

I regularly export my databases and just copy/paste into a text file near my site/forum backup files incase I ever need it. Maybe this is a good idea? it's saved me a few times.

Then I just copyed from the text file and pasted into phpmyadmin and fix it all backup.

I do the same thing when testing all my phpbb2 software+mods, I upload the entire forum or changed sections and then export database data for phpbb2 and import in phpmyadmin on host.

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : database, tables

  1. Can I Access MySQL Database From Outsite, Directly
    (10)
  2. Astahost Instable..
    now my database is gone (7)
    Hi there! I was just trying to access PHPmyadmin in the cpanel, but it told me to use the right
    username. Took me 2 minutes to figure out: No users, no databases set up. My site can't access
    it either. I had full databases installed and used them 2 hours ago! Ok, this is the third time in
    one week, that I have severe inaccessibility problems with astahost.. CUT I just tried again and now
    it is working the same way it was before. What the ®Çª?? Is this regular behaviour at astahost and
    do I just have to live with the fact that my site goes west twice a week without a....
  3. IPS Driver Error / MySQL Database
    What in the world? How is this possible? (1)
    Just several hours ago, I couldn't access my website/forum because of some error with an SQL
    socket or something like that. I need desperate help because I don't want to reformat everything
    again. Well, here is what comes up: IPB WARNING mysql_connect(): Can't connect to local
    MySQL server through socket '/var/lib/mysql/mysql.sock' (2) (Line: 114 of
    /ips_kernel/class_db_mysql.php) There appears to be an error with the database. You can
    try to refresh the page by clicking here. Error Returned: SQL error: Can't connect to local
    M....
  4. MySQL Database
    Important Report (3)
    I'm writing this to report about a error. One of my mySQL database has been droped and my site
    stop working. I don't know the reason. I'm hosted on gamma server. I think you (admin)
    should check it. PS: One of my paid hosting provider also met this problem a few day ago.....
  5. Database Information?
    (3)
    I'm trying to install 4images gallery but I'm having a problem with the database
    information. When I run the installer it asks me for these information: Database server hostname
    Database name Database username Database password What do I put for each one? Thanks.....
  6. Problem With Mysql
    Cannot connect to database.... (6)
    Hi, this is the first time after I got my hosting to try and use MySQL. My site is
    http://abhiram.astahost.com . I created a user in CPanel -> 'MySQL Databases' as root. So,
    the new user created will be 'abhiram_root'. Similarly I created a database called
    'webpage' (which changes to 'abhiram_webpage'). I set up the database and the tables
    using phpMyAdmin and uploaded the files after making changes to the user name and the database. But
    it's not opening the database. It's connecting to MySQL without any problems, but it
    isn'....

    1. Looking for database, tables

See Also,

*SIMILAR VIDEOS*
Searching Video's for database, tables
advertisement



Database Tables Gone?

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com