1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP / MYSQL question

Discussion in 'Off Topic' started by pk698, Aug 14, 2010.

  1. pk698

    pk698 Active Member

    I backed up my site about 6 months ago. And I swore I backed up the database as well at that time, but it's missing. So I only have the PHP files.

    Is it possible to rebuild the MYSQL database?

    I'm not a coder by the way. I had this script done by a programmer on getafreelancer.

    Or am I SOL on this one? :(
  2. Shamil

    Shamil Well-Known Member

    I lost my sql database one. Luckily I remembered one table. It's possible to recontruct, but you need to seek out each SQL statement and build/add columns to tables from there.
  3. mlx

    mlx Well-Known Member

    So the database is completely gone?

    Not just a crashed table or something that could be repaired?
  4. Walter

    Walter Well-Known Member

    Ask your webhost if he made a backup.
  5. wizzard

    wizzard Active Member

    Did you do your backup through cpanel?
  6. pk698

    pk698 Active Member

    I thought I had backed up through cpanel. but for some reason, I don't have the mysql file/dump. I think I pulled a Homer on that one. And I don't have web hosting with lunarpages anymore.
  7. Floris

    Floris Guest

    If you do not have the mysql database, you can't restore it, sounds logical to me. sorry!
  8. Shamil

    Shamil Well-Known Member

    Correct, but it can be rebuilt from what the script tells you.
  9. Floris

    Floris Guest

    If the database has the data "banana"
    and you have no database backup with the content "banana" for that database > table > row > field.
    You can have all the scripts in the world, but while rebuilding the database > table > row > field ....
    it won't have banana in there.

    A user shouldn't care about their database structure, as the script will just rebuild it for you - most web apps like forum software and alike come with installation.

    It's all about the content.

    People shouldn't care that they computer is stolen, or that their hard drive is broken.
    You can buy a new computer and a new hard drive.
    they should care that the data on the drive in that computer, is what is gone.

    You can have 15 million posts (banana, banana, banana..) but you only need 1 structure.
    You can rebuild the structure, of course .. but that doesn't give you back your banana.
  10. Shamil

    Shamil Well-Known Member

    What I always do, is with any script I build, which has uses SQL, I have a file which checks for the table, and if it's not there, re-create it. I add tables using this. It's messy, but I know it won't go anywhere.
  11. Floris

    Floris Guest

    Again .. which has NOTHING to do with anybody getting their lost database back.

    The database is used to store data. Lose data, you have no data.
    Not sure how I can explain this to you.
  12. Erik

    Erik Well-Known Member

    You can rebuild the structure, yes. But you can't recover the data. :)
  13. Shamil

    Shamil Well-Known Member

    Maybe I need to go to sleep now.

    I know she cannot recover the database contents, but OP asked if the database could be rebuilt. To me, that does not involve the contents of the database, only the structure schema.
  14. Erik

    Erik Well-Known Member

    You are correct, he did literally say "rebuild." But I took it to mean "rebuild the contents of the database," i.e. the posts, users, etc. :)

    Also, the OP is male (avatar is deceiving, I know). :D
  15. Floris

    Floris Guest

    A database backup contains both structure and the insert rows. Unless specified it's structure only.
    It's accepted to assume it implies that the importance lies with the data stores in the database.
    Especially when it's what is of value, the structure means nothing, as it's easy to rebuild.

Share This Page