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!

Create MySQL user and database with same name as cPanel user

Discussion in 'Database Discussion' started by DanH42, Jun 2, 2014.

  1. DanH42

    DanH42 Active Member

    Joined:
    Sep 11, 2011
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    Bloomington, IL
    cPanel Access Level:
    Root Administrator
    Let's say I have a cPanel user called "example". This user can create MySQL users and databases, provided that they are prefixed with "example_".

    I'd like to set up a MySQL user called "example" (no underscore or anything), and a database by the same name. I'm in the process of migrating a large number of sites from an old server where this was the convention, and being able to do this would greatly simplify the process, since I wouldn't have to update all the config files to reflect new usernames and database names.

    Is there a way to accomplish this? As long as the cPanel user ultimately has control of the account through phpMyAdmin, I don't care if I have to create the user/database from a WHM admin account. I see a "Disable Database Prefix' option, but besides being minimally explained in the documentation, I'd like any subsequent users and databases to be prefixed as they are normally.
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,896
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    You can disable database prefixing, but you can not have prefixing enabled for some accounts/databases and disabled for others. Typically, disabling database prefixing is the best way to handle the issue you have described. Databases and database users are still controlled by the user even if no prefix is used.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. DanH42

    DanH42 Active Member

    Joined:
    Sep 11, 2011
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    Bloomington, IL
    cPanel Access Level:
    Root Administrator
    Thanks for the clarification. With that in mind, I've gone ahead and created a feature request, so we'll see if that goes anywhere.
     
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