Mapping a User to Database

Navigation:  MySQL Governor >

Mapping a User to Database

Previous pageReturn to chapter overviewNext page

[MySQL Governor 1.x]


Traditionally MySQL Governor used prefixes to map user to database. With the latest version, we automatically generate user -> database user mapping for cPanel and DirectAdmin control panels (other panels will follow).


The mapping file is located at: /etc/container/dbuser-map


The format of the file:


[dbuser_name1] [account_name1] [UID1]
[dbuser_nameN] [account_nameN] [UIDN]


For example:


pupkinas_u2 pupkinas 502
pupkinas_u1 pupkinas 502
pupkinas_u3 pupkinas 502
pupkin2a_uuu1 pupkin2a 505
pupkin10_p10 pupkin10 513
pupkin5a_u1 pupkin5a 508
pupkin3a_qq1 pupkin3a 506
pupkin3a_test22 pupkin3a 506
pupkin3a_12 pupkin3a 506


This would specify that db users: pupkinas_us2, pupkinas_u1, pupkinas_u3 belong to user pupkinas with uid (lve id)  502

db user pupkin2a_uuu1 belongs to user pupkin2a with uid 505, etc...


This file is checked for modifications every 5 minutes.


If you need to force reload of that file, run:


service db_governor restart