Knowledgebase

Unable to view a database under the “Manage My Databases”: The cPanel user “$username” does not exist in the database map Print

  • 0

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:

  1. Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
  2. 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.
  3. 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.
  4. Update cPanel's database cache.
    /usr/local/cpanel/scripts/update_db_cache

 

Additional resources

The rebuild_dbmap Script


Was this answer helpful?
Back