How to find unmapped databases?
Due to some problems in a migration, I've found that there are unmapped databases, as well as some missing databases too.
Is there a command I can run to find unmapped databases, or mapped but nonexistent databases?
I would like to crosscheck the databases that cPanel has mapped with the ones that actually exist in MySQL.
-
Hello, There's no script or command available that will list databases that aren't associated with a cPanel account, however you can find a list of databases that are associated with cPanel accounts with a command such as: whmapi1 list_databases
This WHM API 1 function is documented at: WHM API 1 Functions - list_databases - Software Development Kit - cPanel Documentation You'd need to manually compare this with the databases stored in the /var/lib/mysql/ directory to see which databases aren't associated with a cPanel account, or develop a custom script that cross-references the results. Thank you.0
Please sign in to leave a comment.
Comments
1 comment