Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. restore mysql database from [Program Files]

restore mysql database from [Program Files]

Scheduled Pinned Locked Moved Database
questiondatabasemysql
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jassim Rahma
    wrote on last edited by
    #1

    Hi, I had mysql installed on my laptop (Windows Vista) but my operating system got corrupted and i had to remove the hard disk and use it as external hard disk. so currently i have access to the laptop when i connect as external hard disk and the I can go to the Program Files\Mysql folder just like any folder in my external hard. Now I want to know how can I restore-re-create the database on my new machine using the files of the mysql available on my external hard disk (which use to be my laptop hard disk)? Thanks, Jassim

    L 1 Reply Last reply
    0
    • J Jassim Rahma

      Hi, I had mysql installed on my laptop (Windows Vista) but my operating system got corrupted and i had to remove the hard disk and use it as external hard disk. so currently i have access to the laptop when i connect as external hard disk and the I can go to the Program Files\Mysql folder just like any folder in my external hard. Now I want to know how can I restore-re-create the database on my new machine using the files of the mysql available on my external hard disk (which use to be my laptop hard disk)? Thanks, Jassim

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Change my.ini to point to the correct datadir and restart MySql. Where's your backup? Precisely, and that's why you need one. Store it on a USB-key and keep it under your pillow when you go to sleep :)

      Bastard Programmer from Hell :suss:

      J 1 Reply Last reply
      0
      • L Lost User

        Change my.ini to point to the correct datadir and restart MySql. Where's your backup? Precisely, and that's why you need one. Store it on a USB-key and keep it under your pillow when you go to sleep :)

        Bastard Programmer from Hell :suss:

        J Offline
        J Offline
        Jassim Rahma
        wrote on last edited by
        #3

        I know! it's a big mistake not to take a backup :) huhuhu :) listen.... I tried but mysql services was failing to start..

        datadir="F:/ProgramData/MySQL/MySQL Server 5.5/Data/"

        then I tried putting it in a folder within the new machine with no2 like this:

        datadir="C:/ProgramData/MySQL/MySQL Server 5.5/Data2/"

        and still the same problem.. then I tried to copy the folders for the dbxxx (my database) in the C:/ProgramData/MySQL/MySQL Server 5.5/Data and I got it in the list but i am getting: 1146 Table dosen't exist for every table when i try to open it.. what should I do now?

        J L 2 Replies Last reply
        0
        • J Jassim Rahma

          I know! it's a big mistake not to take a backup :) huhuhu :) listen.... I tried but mysql services was failing to start..

          datadir="F:/ProgramData/MySQL/MySQL Server 5.5/Data/"

          then I tried putting it in a folder within the new machine with no2 like this:

          datadir="C:/ProgramData/MySQL/MySQL Server 5.5/Data2/"

          and still the same problem.. then I tried to copy the folders for the dbxxx (my database) in the C:/ProgramData/MySQL/MySQL Server 5.5/Data and I got it in the list but i am getting: 1146 Table dosen't exist for every table when i try to open it.. what should I do now?

          J Offline
          J Offline
          Jassim Rahma
          wrote on last edited by
          #4

          this is the error when I tried to start mysql services in the first scenario.. The MySQL service terminated unexpectedly.

          1 Reply Last reply
          0
          • J Jassim Rahma

            I know! it's a big mistake not to take a backup :) huhuhu :) listen.... I tried but mysql services was failing to start..

            datadir="F:/ProgramData/MySQL/MySQL Server 5.5/Data/"

            then I tried putting it in a folder within the new machine with no2 like this:

            datadir="C:/ProgramData/MySQL/MySQL Server 5.5/Data2/"

            and still the same problem.. then I tried to copy the folders for the dbxxx (my database) in the C:/ProgramData/MySQL/MySQL Server 5.5/Data and I got it in the list but i am getting: 1146 Table dosen't exist for every table when i try to open it.. what should I do now?

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            Sounds like the database-file is corrupt. Did it die during a write?

            jrahma wrote:

            what should I do now?

            Google for "repair corrupt MySQL" and try everything you find.

            Bastard Programmer from Hell :suss:

            J 1 Reply Last reply
            0
            • L Lost User

              Sounds like the database-file is corrupt. Did it die during a write?

              jrahma wrote:

              what should I do now?

              Google for "repair corrupt MySQL" and try everything you find.

              Bastard Programmer from Hell :suss:

              J Offline
              J Offline
              Jassim Rahma
              wrote on last edited by
              #6

              no it dies during laptop booting only even before windows starts its booting

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups