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.

Dude, where's my database?

Discussion in 'Database Discussions' started by Encaitar, Dec 30, 2004.

  1. Encaitar

    Encaitar Registered

    Joined:
    Dec 30, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I have created an SQL database... but I don't know where it is. :D

    I used cPanel to create it, and phpMyAdmin to manipulate it. The problem is that neither of these tell me where they have placed this database for when I want to access it.

    The cPanel documentation says that the database is in 'var/lib/mysql', but this does not exist, or I can't see it in FTP.

    Can anyone tell me where the database is in the form of a sample path? Or how to find out the location of the database.
     
  2. dave9000

    dave9000 Well-Known Member

    Joined:
    Apr 7, 2003
    Messages:
    891
    Likes Received:
    1
    Trophy Points:
    16
    Location:
    arkansas
    cPanel Access Level:
    Root Administrator
    on mine its in /var/lib/mysql/<database>

    however you can do locate <accountname_databasename> in ssh and this should give you the path to it
     
  3. Encaitar

    Encaitar Registered

    Joined:
    Dec 30, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Where is that directory? I have searched all over using an FTP client and still can't find it.

    Also, what is SSH?
     
  4. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Since you are not the server owner (I presume), only your host provider has access to see it at that level.
     
  5. Encaitar

    Encaitar Registered

    Joined:
    Dec 30, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    So, for example, what path am I looking at to access a database called 'Database1'?
     
  6. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Unless you are the server owner and using SSH (secure shell) then you cannot see it. It is in /var/lib/mysql as stated, but only the server owner (root) can see it.
     
  7. Encaitar

    Encaitar Registered

    Joined:
    Dec 30, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    So can I not have a web-page that takes data from a table in the database and put it into text boxes? That would seem to defeat the object of being able to create custom MySQL databases.
     
  8. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Yes you can, you though just access like so;

    Server: localhost
    Database: username_databasename
    Password: password

    Follow the examples in you control panel screens on the sql pages. ;)

    You should though really be asking your host provider for this help though....
     

Share This Page