Symptoms
- When accessing the "Manage my Databases" menu in cPanel, databases or users are missing.
- Trying to enter PHPMyAdmin leads to the page constantly refreshing.
- Checking the cPanel error log(/usr/local/cpanel/logs/error_log), shows the following entry:
Cpanel::Exception::Database::CpuserNotInMap/(XID 6wc88a) The cPanel user “$username” does not exist in the database map.
Cause
This issue can occur when the database map file(/var/cpanel/databases/$username.json) is empty. When this happens, databases and their users are no longer properly mapped to the cPanel user and so are not loaded by the "Manage My Databases" menu.
Solution
This file can be recreated by rebuilding the database map for the cPanel user. To do so, please follow these steps:
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Run the
rebuild_dbmap
script with the--noop
flag to preview the databases that will be configured in the user's database map./usr/local/cpanel/scripts/rebuild_dbmap --noop $username
Please note that "$username" must be replaced with the cPanel user's username. - Run the script without the
--noop
flag to rebuild the user's database map./usr/local/cpanel/scripts/rebuild_dbmap $username
Please note that "$username" must be replaced with the cPanel user's username. - Update cPanel's database cache.
/usr/local/cpanel/scripts/update_db_cache
Comments
0 comments
Please sign in to leave a comment.