moving old MySQL database to new Linux partition without mysqldump

Discussion in 'MySQL' started by mr_dean, Jan 3, 2007.

  1. #1
    I've forgot to mysqldump one of my databases.

    But I have files in /old_linux/var/lib/mysql/mydatabase

    Could I just move it to /var/lib/mysql and it will work?

    Should I do something more?
     
    mr_dean, Jan 3, 2007 IP
  2. cyanide

    cyanide Peon

    Messages:
    483
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Can you not do a dump at a command prompt?
     
    cyanide, Jan 4, 2007 IP
  3. mr_dean

    mr_dean Peon

    Messages:
    280
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I can't because I cannot boot from partition where I have old data .
     
    mr_dean, Jan 4, 2007 IP
  4. skipper55

    skipper55 Active Member

    Messages:
    136
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #4
    Hey mr_dean I am pretty sure that I was able to move the old data to the new data spot before and it worked. As long as you get all the proper files and the Mysql is the same version. I also think I had to redo the permissions but it did work for me.
     
    skipper55, Jan 4, 2007 IP
  5. mr_dean

    mr_dean Peon

    Messages:
    280
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    unfortunately, MySQL isn't the same version :(. I will try to see does it go with cp and chown, if not, won't use them :(
     
    mr_dean, Jan 4, 2007 IP
  6. cyanide

    cyanide Peon

    Messages:
    483
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Figured there was a logical reason.
    Copying the folder should work, unless versioning becomes a problem.

    Failing that...
    Do you know anyone that has a server with the same mysql version as your old one?
    If so, you could tar the directory, move it to a public_html folder, wget it to a buddy's server with the same mysql version, have them copy it to their lib directory, then run the dump for you.

    Bit of a work-around, which should work
    ... never had this happen before

    What version is the old and new?
     
    cyanide, Jan 4, 2007 IP
  7. mr_dean

    mr_dean Peon

    Messages:
    280
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I used to have CentOS4 and there comes 4.0.x.
    I've changed mainboard and Linux weren't able to mount / properly when booting. I've googled the problem and seen some people aren't be able to fix it. I tried to modify /etc/mtab and /etc/fstab /boot/grub/grub.conf to make it boot properly. Didn't work.

    Than I deleted one partition and I've installed Ubuntu Edgy (6.10). I'm quite satisfied for my needs but I've installed 64bit version and now default Java don't work properly and I don't have flash plug-in. Avoid 64bit version of Linux, still.

    Thank for your effort guys!
     
    mr_dean, Jan 4, 2007 IP