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!

Mapping MySQL user permissions via command line? (/cpanel/bin/?)

Discussion in 'Database Discussion' started by Kadence, Aug 29, 2014.

  1. Kadence

    Kadence Member

    Joined:
    Nov 25, 2006
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    151
    If a database and user are created outside of cPanel, you call map them to cPanel dbmaptool; for instance for account "acct1", database "acct1_db1" and user "acct1_user1":
    Code:
    /usr/local/cpanel/bin/dbmaptool acct1 --type mysql --dbs 'acct1_db1' --dbusers 'acct1_user1'
    This tells cPanel that acc1_db1 exists, and that acct1_user1 exists.

    However, this does not tell cPanel whether acct1_user1 has permissions for the database acct1_db1.

    How do you tell cPanel about user permissions via the command line?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    You would have to utilize our API to grant a database user permissions to a database, as referenced in the following post:

    Database User Permissions

    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