Professional Web Applications Themes

Restoration from Tarball - MySQL

Running vers 5.0.18 on FreeBSD 4.9 Have some old data in tar format. Set of *.frm, *.MYI, *.MYD files - How can I import these inot the New mysql system Thanks...

  1. #1

    Default Restoration from Tarball

    Running vers 5.0.18 on FreeBSD 4.9
    Have some old data in tar format. Set of *.frm, *.MYI, *.MYD files - How
    can I import these inot the New mysql system

    Thanks
    Adam Smith Guest

  2. #2

    Default Re: Restoration from Tarball

    Adam Smith wrote:
    > Running vers 5.0.18 on FreeBSD 4.9
    > Have some old data in tar format. Set of *.frm, *.MYI, *.MYD files - How
    > can I import these inot the New mysql system
    >
    > Thanks
    Follow these steps:
    1) find which data directory you are using
    mysql> SHOW VARIABLES LIKE "datadir";
    2) find out which user and group own the files the files in your data directoty
    $ ls -l /path/to/data_directory
    (let's say those user and group are "myusr" and "mygrp")
    3) make a new directory under your data directory and cd there
    $ mkdir /path/to/data_directory/new_db
    $ cd /path/to/data_directory/new_db
    4) untar the files
    tar -xf filename.tar
    (Assuming that your tar does not have any subdirectory. if it does, just move the files
    in the directory that you created manually, and erase the one coming from the tar file)
    5) change the ownership of the new directory to the user and group you found in step (2)
    $ cd /path/to/data_directory/
    $ chown -R myusr.mygrp new_db
    6) From mysql, you can just USE new_db and you should see the tables.

    If you get an error, review the above steps carefully.

    ciao
    gmax

    --
    _ _ _ _
    (_|| | |(_|>< The Data Charmer
    _|
    [url]http://datacharmer.blogspot.com/[/url]
    Giuseppe Maxia Guest

Similar Threads

  1. grayscale photo restoration
    By Curt_Stenz_Graphics@adobeforums.com in forum Adobe Photoshop Mac CS, CS2 & CS3
    Replies: 9
    Last Post: March 1st, 03:31 AM
  2. [OT] Set packed path in tarball (using Gnu Tar)
    By Sisyphus in forum PERL Modules
    Replies: 1
    Last Post: August 26th, 02:19 PM
  3. preview7 tarball size
    By Brian Candler in forum Ruby
    Replies: 5
    Last Post: August 4th, 10:17 AM
  4. Backup Restoration Procedure
    By Martin Roclawski in forum SCO
    Replies: 6
    Last Post: July 21st, 03:10 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139