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.

Oops! Deleted databases!

Discussion in 'Database Discussions' started by beehave, Dec 7, 2012.

  1. beehave

    beehave Well-Known Member

    Joined:
    Jun 26, 2005
    Messages:
    104
    Likes Received:
    0
    Trophy Points:
    16
    I accidentally deleted half of the databases on my server including the mysql folder. I wrote a script to restore the files but still get connection error. How can I fix this without running restore backup for each account in whm? PLease help asap! Thanks in advance!
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,470
    Likes Received:
    197
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Are backups enabled on the server? Is this option selected in your backup configuration?

    Per Account and Entire MySQL Directory
     
  3. beehave

    beehave Well-Known Member

    Joined:
    Jun 26, 2005
    Messages:
    104
    Likes Received:
    0
    Trophy Points:
    16
    Backups are enabled. Per account only was selected. Bad huh?
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,470
    Likes Received:
    197
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Yeap. :(

    I'm sorry I don't have a better answer for you.
     
  5. beehave

    beehave Well-Known Member

    Joined:
    Jun 26, 2005
    Messages:
    104
    Likes Received:
    0
    Trophy Points:
    16
    So , I have to go through each account and restore via whm? Thanks for your help!
     
  6. beehave

    beehave Well-Known Member

    Joined:
    Jun 26, 2005
    Messages:
    104
    Likes Received:
    0
    Trophy Points:
    16
    One more question. I am having to do this because the "/var/lib/mysql/mysql" folder was deleted, correct?
     
  7. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,470
    Likes Received:
    197
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You should probably open a ticket to cPanel Support and speak with a Technical Specialist on this, beehave.
     
  8. CitizenK

    CitizenK Well-Known Member

    Joined:
    Jun 5, 2012
    Messages:
    64
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    On The Road
    cPanel Access Level:
    Root Administrator
    Unfortunately you are correct beehave. The mysql data directory is /var/lib/mysql, so deleting this directory will result in mysql losing it's database data.
     
Loading...

Share This Page