This has been rare, but I have seen it a few times lately. A customer asked why their database was missing in their cpanel. Their site was still able to access the database however, and when I looked in /var/lib/mysql the database still showed up there. The reason for this is that the database mapping system appears to have lost track of it.
The fix is pretty easy.
- SSH to the server and run the following command
/usr/local/cpanel/bin/dbmaptool cpanelusername --type mysql --dbs 'nameofdatabase' --dbusers 'dbusername'
Change the following in the above command
- cpanelusername = the username of the cpanel account
- nameofdatabase = the name of the database that is missing
- dbusername = the username assigned to that database.
Also, note the quotation marks around the databasename and dbusername are required.
Once you have run this command, the database should now show up in the users cPanel.