Skip to main content

Remove unknown/crushed/deleted database from cPanel

Comments

3 comments

  • cPanelMichael
    Hello, Can you try manually creating that database under the account, and then deleting it, as a method of clearing it from the database mapping configuration files? Thank you.
    0
  • Lizardhr
    Hello, Is there a fresh way to clear the database mapping configuration files? I have deleted severals DB, something more easy than manual creation of deleted databases would be better. Thank's.
    0
  • cPanelMichael
    Hello @Lizardhr, Can you let us know the method you used to delete the databases? Generally, the "Unknown database" error messages only appear when the databases are removed manually via the MySQL command line instead of through a supported method (e.g. the cPanel UI or through the cPanel UAPI). Removing the databases using a supported method will ensure the YAML and JSON files for the user in /var/cpanel/databases/ are properly updated. The best way to solve the issue if you've deleted the databases via an unsupported method is to manually create and delete that database. You can do this via the command line if you prefer. EX:
    uapi --user=user123 Mysql create_database name=user123_test1 uapi --user=user123 Mysql delete_database name=user123_test1
    Thank you.
    0

Please sign in to leave a comment.