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.

dbmaptool clarification of correct syntax

Discussion in 'Database Discussions' started by eva2000, Nov 14, 2012.

  1. eva2000

    eva2000 Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    322
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Brisbane, Australia
    cPanel Access Level:
    Root Administrator
    Twitter:
    I'm trying to understand the correct syntax for mapping a manually ssh created mysql database to a cpanel user account's mysql user

    Using the following as an example

    • cpanel username = cpusername
    • existing mysql username = cpusername_dbusername

    I want to create a new database named cpusername_newdbname and attach it to cpusername_dbusername

    Code:
    mysqladmin create cpusername_newdbname
    From what I read to map cpusername_newdbname to cpusername_dbusername I need to type

    Code:
    /usr/local/cpanel/bin/dbmaptool cpusername --type mysql --dbs 'cpusername_newdbname' --dbusers 'cpusername_dbusername'
    The part i'm confused about is the way cpanel defines db user and database names

    should db user be listed as

    Code:
    --dbusers 'cpusername_dbusername'
    or

    Code:
    --dbusers 'dbusername'
    should db name be listed as

    Code:
    --dbs 'cpusername_newdbname'
    or

    Code:
    --dbs 'newdbname'
    and dbmaptool automatically append cpusername_ in front of it ?

    Even after this step of db mapping, I would still need to log into cpanel to setup cpusername_dbusername permissions on the cpusername_newdbname ?? Or do it old fashion way via grant command line ?

    but then the grants don't show up in /var/cpanel/database/grants_cpusername.yaml ?
     
    #1 eva2000, Nov 14, 2012
    Last edited: Nov 14, 2012
Loading...
Similar Threads - dbmaptool clarification correct
  1. Islandhosting
    Replies:
    19
    Views:
    351

Share This Page