Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Remove unknown/crushed/deleted database from cPanel

Discussion in 'Database Discussion' started by Mugoma, Jun 1, 2017.

  1. Mugoma

    Mugoma Well-Known Member

    Joined:
    Aug 1, 2016
    Messages:
    74
    Likes Received:
    4
    Trophy Points:
    8
    Location:
    Nairobi
    cPanel Access Level:
    Root Administrator
    We are getting following error in cPanel backup job:

    The backup process encountered the following errors:

    abx_xyz[2017-06-01 04:30:35 +0200] abx_xyz: mysqldump: Got error: 1049:
    Unknown database 'abx_xyz' when selecting the database

    The database abx_xyz doesn't exist (probably corrupted or deleted). How dod we remove it so that cPanel doesn't attempt to back it up?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,215
    Likes Received:
    1,759
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
  3. Lizardhr

    Lizardhr Member

    Joined:
    Sep 14, 2015
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Brazil
    cPanel Access Level:
    Reseller Owner
    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.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,215
    Likes Received:
    1,759
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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:

    Code:
    uapi --user=user123 Mysql create_database name=user123_test1
    uapi --user=user123 Mysql delete_database name=user123_test1
    Thank you.
     
Loading...

Share This Page