SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Non-Member
    Join Date
    Jan 2004
    Location
    Seattle
    Posts
    4,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Copying Database Tables from One Hard Drive to Another

    I've been using a preconfigured package (Apache, PHP,
    MySQL) from Apache Friends/XAMPP for several months.
    About a week ago, my computer crashed, and I'm now
    getting back on my feet. I downloaded the latest
    XAMPP, which features upgrades for PHP, phpMyAdmin and
    I think MySQL, too.

    Everything seems to be working fine, and I'm ready to
    retrieve my database, which contains over 100 tables.
    I copied the original XAMPP, with all my databases
    into an external hard drive. I can see my databases at
    the following location:

    MySQL > data > my_database

    But what's the best way to move my_database from the old MySQL > data folder to the new one? I created a new database with the same name, then copied a table named aniorders from the old my_database into it. At first, I thought it was a success - I can see the table in phpMyAdmin just fine.

    But when I click on it, I get an error message saying it can't find an associated file named aniorders.MYI (or MIY?)

    I did a Windows search and couldn't find a file by that name on my computer, including my backup copy of the MySQL folder. So I'm guessing that file was stored somewhere else and is probably lost forever. Where would it normally be located? What kind of information would it contain? And is there a way to recreate it?

    I have a folder with about 102 tables ready to be pasted into my new MySQL folder, but they may all be useless without their associated .MYI files.

    Thanks.

  2. #2
    SitePoint Member
    Join Date
    Jul 2004
    Location
    Budapest
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    check table sometable;
    repair table sometable;

  3. #3
    Non-Member
    Join Date
    Jan 2004
    Location
    Seattle
    Posts
    4,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ene
    check table sometable;
    repair table sometable;
    I'm not sure what you mean. However, I downloaded one of my working tables off the Internet, imported it into my database and checked it out. Turns out there are a total of THREE files that make up a table. It looks like the lone files in my backed up database are merely the tables themselves, sans data. One other file includes the data in the table.

    What I can't figure out is why my folder includes all the primary files only. What happened to all the files representing data stored in the tables?


Bookmarks

Posting Permissions

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