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.

Linking existing DB to the user's account

Discussion in 'Database Discussions' 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:
    262
    Likes Received:
    12
    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:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...
Similar Threads - Linking existing user's
  1. ocraft
    Replies:
    1
    Views:
    180

Share This Page