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.

Can I make databases made from shell display in cPanel?

Discussion in 'General Discussion' started by kovacs, Mar 30, 2005.

  1. kovacs

    kovacs Member

    Joined:
    Mar 29, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Oslo, Norway
    Hello -

    I have imported a couple of databases into my dedicated server but I did not use cPanel to create the databases first.

    Is there a way for me to "import" these databases into cPanel so that they are visible in WHM/cPanel or do I need to make new databases and import the data into them?

    With regards,
    kovacs
     
  2. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    38
    First we need to know what kind of database this is you are importing. If its neither mysql or postgresql you may need to have it coverted before you can import it. You should be able to export or create a dump of the database on the old server with either command line or tools such as phpMyAdmin ( for mySQL ), etc.
     
  3. kovacs

    kovacs Member

    Joined:
    Mar 29, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Oslo, Norway
    Thanks.

    these are bog standard MySQL databases. One of them is fairly large (150 MB).
     
  4. Norman

    Norman Well-Known Member

    Joined:
    Sep 20, 2004
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    I would assume they are not showing in cpanel because there isn't a corresponding entry in the tables file when you look via the root whm at the databses.. this is just a guess.. :)
     
  5. kovacs

    kovacs Member

    Joined:
    Mar 29, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Oslo, Norway
    Thanks. Can someone explain to me what this means?
     
  6. Norman

    Norman Well-Known Member

    Joined:
    Sep 20, 2004
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    Everytime you create a DB via the Database panel in cpanel.. it also inserts a record in the user, host and db tables in the root mysql server. these tables control access to the db's..

    If that entry isn't there, I assume you won't be ablet o admin it via the phpMyAdmin.

    I would login to your root mySql Admin (WHM -> phpMyAdmin) and try to make sure those records are in there.. or have someone help you by created the records.
     
  7. kovacs

    kovacs Member

    Joined:
    Mar 29, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Oslo, Norway
    I have full control of these databases via phpmyadmin. I just don't see them in any of the cpanels, most likely because they were created by my root user and not a user account db user.

    But you are correct, they have no entries in the db table in the mysql database either. I'll try to construct those entries and see if that solves my problem.

    Thank you,
    kovacs
     
  8. kovacs

    kovacs Member

    Joined:
    Mar 29, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Oslo, Norway
    I tried to enter the name of the database and the correct account user into the db table, with the same grants as all other databases, but it still does not show up on this account's db list.

    Do all databases on an account have to start with the accountuser_ prefix to be shown here?
     
  9. kovacs

    kovacs Member

    Joined:
    Mar 29, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Oslo, Norway
    Correcting myself: I can work with all databases from the WHM cPanel but obviously not from the correct account's phpmyadmin.

    Which tables need updating? I have added an entry to the db table only, as I found no other place to add anything. The host table I am unable to browse. The user table has one entry per user I have, including the ones I have made from the shell.

    Can I get around this by adding the account_user as a user of the db in question?
     
  10. kovacs

    kovacs Member

    Joined:
    Mar 29, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Oslo, Norway
    Working towards a solution here...a GRANT ALL ON mydb.* TO myuser; followed by a FLUSH PRIVILEGES; lets my account user see the db in phpmyadmin. It still does not show up in cPanel - could there be a caching issue involved?
     
Loading...

Share This Page