Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Where does cPanel/WHM store its associations between users and their MySQL databases? I can't seem to find anything in /home/$USER, or /var/cpanel, or /etc/..

share|improve this question

3 Answers 3

up vote 1 down vote accepted

In the newer cPanel versions, cPanel stores this config in /var/cpanel/databases/username.yml file.

share|improve this answer

Last time I was unfortunate enough to use cPanel, it just looked for any databases that matched /^<USERNAME>_.*$/

share|improve this answer

In the mysql database, there is a table called "db". In this table, it shows which users have which accesses to which DBs. This is most probably where WHM stores the actual ACLs that allow user1 access to his DB, and his DB only.

Or, are you asking where it stores the properties of "which DBs to show in the control panel for this user"? If so, that may be best posed to the CPanel user list. I think that is in the CPanel database somewhere.

share|improve this answer
    
The "db" table in the "mysql" database is used by MySQL to determine which mysql users have access to which databases. Im interested in knowing how cPanel determines which databases are "owned" by a given cpanel user. For example, when you create a backup for a user, cPanel will include in the backup the databases that the user "owns". How does it know which ones? –  tylerl Nov 18 '09 at 18:51
    
It keeps its own set of files to handle which users own which databases. It is in the CPanel code itself, and located in the CPanel system directories somewhere. Your best bet would be to ask a CPanel specialist on their user boards or something. I don't have enough experience to guess well. –  samuelstringham Nov 20 '09 at 19:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.