Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Database location in directory

Discussion in 'Database Discussion' started by Eladnova, Feb 7, 2018.

  1. Eladnova

    Eladnova Registered

    Joined:
    Feb 2, 2018
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Dublin
    cPanel Access Level:
    Website Owner
    Hi all
    I have SSH access to my shared hosting (A2 Hosting) and am wondering where databases are stored.

    I'm new to cPanel (normally use Plesk) so this is new to me.

    Here's a screengrab of what I can see when using my FTP application

    Thanks - appreciate the help.
     

    Attached Files:

  2. cPWilliamL

    cPWilliamL cP Technical Analyst II
    Staff Member

    Joined:
    May 15, 2017
    Messages:
    257
    Likes Received:
    29
    Trophy Points:
    103
    Location:
    America
    cPanel Access Level:
    Root Administrator
    Hi @Eladnova,

    What operations are you trying to perform that require direct access to the MySQL data directory? You typically do not directly interact with MySQL files. The MySQL data directory is set to '/var/lib/mysql/' by default; however, this is off limits to cPanel users, but still accessible via MySQL interfaces, as configured in cPanel > MySQL Databases.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Eladnova

    Eladnova Registered

    Joined:
    Feb 2, 2018
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Dublin
    cPanel Access Level:
    Website Owner
    Hi @cPWilliamL

    Thanks for asking. I might be approaching this (wrongly) with some assumptions from using Plesk.

    Basically I have a local NAS with an SSH backup app built in. It lets me perform scheduled backups of my entire cPanel. I was hoping that somewhere within the directory structure I'd find useable database backups.

    Also, with Plesk installation on my VPS my scheduled and dropbox backups both FTP me my webspaces which includes my databases.

    So I guess I'm finding that cPanel is a little different in this respect.

    I know there's a Backup Wizard which will backup databases but at the moment cPanel doesn't offer scheduled backups to saved destinations.
     

    Attached Files:

    • NAS.png
      NAS.png
      File size:
      518.5 KB
      Views:
      1
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You'd need to utilize the "mysqldump" utility first to generate a backup of the database via the command line. That will allow you to generate a copy of the database in the account's home directory, which you can then have moved to your remote destination.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice