Recover MySql databases

Discussion in 'Site & Server Administration' started by DjCezar, May 27, 2008.

  1. #1
    Hi all! I recently had a hdd crash on my dedicated server and the technical department replaced the old hdd with a new one.
    They made a new install of Debian on it and after that mounted my old hdd.
    My question is, how can I recover all mysql databases from the old hdd which is mounted ?
    Thank you
     
    DjCezar, May 27, 2008 IP
  2. Freewebspace

    Freewebspace Notable Member

    Messages:
    6,213
    Likes Received:
    370
    Best Answers:
    0
    Trophy Points:
    275
    #2
    Ask your webhosting provider for this...
     
    Freewebspace, May 27, 2008 IP
  3. DjCezar

    DjCezar Member

    Messages:
    53
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #3
    Nice answer .. however I need someone who can really tell me what can I do ? Stop posting stupid answers
     
    DjCezar, May 27, 2008 IP
  4. Freewebspace

    Freewebspace Notable Member

    Messages:
    6,213
    Likes Received:
    370
    Best Answers:
    0
    Trophy Points:
    275
    #4
    if you have backups you can recover your databases otherwise there is no other option simply ask your hosting providers otherwise they can't be recovered...

    unless you have backups..

    if it's a unmanaged server you can't do anything..


    First everybody should ask their webhosting providers before doing anything...
     
    Freewebspace, May 27, 2008 IP
  5. boltok

    boltok Active Member

    Messages:
    257
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    78
    #5
    Shutdown the newly installed mysql. Move the /var/lib/mysql folder to a backup location and copy the same folder from your old hard drive to this location.

    Make sure the ownership and permissions are correct (owner:group should be mysql:mysql for the whole folder). Then start the mysqld service and you should have the previous DB.

    If you already have a full backup somewhere, you can import it like this:
    mysql -u root -p < full_backup.sql
    Code (markup):
     
    boltok, May 27, 2008 IP
  6. gate2vn

    gate2vn Peon

    Messages:
    809
    Likes Received:
    33
    Best Answers:
    1
    Trophy Points:
    0
    #6
    gate2vn, May 27, 2008 IP