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!

Linking existing DB to the user's account

Discussion in 'Database Discussion' started by Alex_11th, May 6, 2016.

  1. Alex_11th

    Alex_11th Member

    Joined:
    Jun 3, 2015
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Thailand
    cPanel Access Level:
    Root Administrator
    Hi everyone.

    Cpanel 56.0.14, I am the server's admin/have root access.

    I have the question regarding cPanel's accounts configs. Every account registered in cpanel is able to create their own MySQL databases, where the database will be named as <accountname><something_user_typed>. I can see the DB's size in cpanel, attach users/grants etc. Everything works fine this way, thanks.

    Now goes my question: how can I link the existing DB (created manually via shell, outside of cpanel) to the existing account - without dumping/recreating the DB under this account?

    Say, I logged into the MySql and created the DB "test_123", with some tables and data. Now I would like to "give" this DB "test_123" to the account "alex_test", which account exists in cpanel. How would I do the trick? Mind that the DB's name is *not* as cpanel creates that, too ("<accountname><something_user_typed>")

    I believe that I need just to adjust the cpanel's config and "attach" the existing DB to the list of existing account's DBs. Where can I find such of config?

    Thanks,
    Alex
     
  2. kdean

    kdean Well-Known Member

    Joined:
    Oct 19, 2012
    Messages:
    280
    Likes Received:
    17
    Trophy Points:
    18
    Location:
    Orlando, FL
    cPanel Access Level:
    Root Administrator
    Just go to: WHM » SQL Services » Database Map Tool

    Then select the account and on the following page, type in the database name you want to assign ownership to.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,855
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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