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!

SOLVED Database Map tool via command line

Discussion in 'Database Discussion' started by bmett, Aug 6, 2018.

  1. bmett

    bmett Well-Known Member

    Joined:
    Aug 5, 2010
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    Brisbane, AU
    Hi there,

    I need to map a large amount of databases and database users to the correct cPanel accounts (several hundred accounts). I'm aware that I can map those one by one via the WHM Database Map Tool, but that would take me forever.

    Is there a command line script I can use for this purpose, so I can create a bash script doing the mapping for me? The databases and database users all follow the same naming convention, therefore a batch mapping script should be easy to create, but I don't know if there is a command line script that maps databases/database users to cPanel accounts.

    Cheers.
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,880
    Likes Received:
    89
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    bmett likes this.
  3. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,137
    Likes Received:
    222
    Trophy Points:
    173
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @bmett

    The dbmaptool script would be the right item for the job as already suggested.
    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. bmett

    bmett Well-Known Member

    Joined:
    Aug 5, 2010
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    Brisbane, AU
    How did I not see that script? I must be blind ...

    thanks for the replies, this did the trick.
     
  5. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,137
    Likes Received:
    222
    Trophy Points:
    173
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @bmett

    No worries, I'm glad it worked for you!


    Thanks!
     
    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