Create MySQL user and database with same name as cPanel user
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.
-
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. 0 -
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. 0
Please sign in to leave a comment.
Comments
2 comments