The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Retrieve db mysql!

Discussion in 'Data Protection' started by dob3rman, Jun 10, 2008.

  1. dob3rman

    dob3rman Active Member

    Joined:
    Feb 13, 2005
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Anyone can help!!! My hard drive failed. I reinstalled everything. Now i still have my old hard drive with the whole cpanel / whm installation on it. The question I have - is there a way to retrieve my mysqldb for all sites???

    Please I need help asap!!
     
  2. srobinson

    srobinson Well-Known Member

    Joined:
    Feb 6, 2008
    Messages:
    81
    Likes Received:
    0
    Trophy Points:
    6
    There is as ive done this before! Im just going to try and find out where they were kept.. Just thought id post to let you know this can be done though and to calm your worries a bit if you had any :p

    Here we go then.. The info.. I know the below directory is where the information is stored but i cant remember 100% if this method works

    1) Stop the MySQL Server where you are copying the DB's too.
    # /etc/init.d/mysqld stop

    2) The usernames on both the new and old system must be the same for this to work! On the OLD HD copy each usernames DB's folders from /var/lib/mysql. Copy this information to /var/lib/mysql

    3) Start the MySQL Server again
    # /etc/init.d/mysqld start

    You should now be good to go :)

    Theres probably another way but that should do the job.. Let me know if you have any problems and let me know if it works please! :)
     
    #2 srobinson, Jun 10, 2008
    Last edited: Jun 10, 2008
Loading...

Share This Page