Copying MySQL Databases from External HD to Local PC

Discussion in 'MySQL' started by xpiamchris, Jun 28, 2012.

  1. #1
    Hello,

    Excuse me if I use the wrong terminology here but I will do my best to explain the problem I am having.

    I have a backup of all my databases stored from our old server onto an external. They are saved as is (not mysqldump files) straight from /var/lib/mysql.

    I am trying to access those files so I can create a proper mysqldump so I can move them to another server that we have.

    I am running Ubuntu right now but don't have much experience with it... which is why I'm having such a hard time getting this done.

    What is the best way to get the databases out to a mysqldump file on my local machine so I can import them into the server we have (server is with outside company).

    I tried directly doing a "cp -r /databasefiles /var/lib/mysql but I get a permission denied.

    Any help would really be appreciated. Thank you!
     
    xpiamchris, Jun 28, 2012 IP
  2. netload

    netload Member

    Messages:
    105
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #2
    This is not MySQL issue, this is your files permissions issue.
    Probably, files were copied by root, and now you're trying to copy by other (not root) user. Try to log in as root or "man sudo"
     
    netload, Jul 1, 2012 IP