Unable to remove a database: This resource is used by installed web application

Follow

Comments

4 comments

  • Avatar
    Rajkumar Janarthanan

    Excellent. It worked the way it should be... Thanks Mr. Marc Lopez.

    0
    Comment actions Permalink
  • Avatar
    Michael Gellner

    I get 

        Zeige Datensätze 0 - 0 (1 insgesamt, Die Abfrage dauerte 0.0006 Sekunden.)

    Means: 0 (zero)

    (Obsidian, Ubuntu 18.04)

    What else can I do?

     

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello Michael Gellner

    If you have the same symptoms, there's a possibility that inconsistency you have differs.

    A deeper investigation is required for such cases. I would suggest submitting a support request to Plesk or to the reseller from which the license was purchased.

    0
    Comment actions Permalink
  • Avatar
    Del C (Edited )

    I found a unique situation where I had an orphan db tied to an active domain and I could NOT delete the old db via Plesk panel (since it thought it was still in use as main db for that domain), so I ran the commands listed above.

    However, when backing up the server I get this error:

    Warning: Application "WordPress"
    Unable to back up database #. Error: Unable to find row with id in data_bases table.

    In order to fix this, you have to manually add the record of the actual main db you're using with the domain to the apsResources table to associate that db as the 'master' for that domain.

    Prior to doing #6 you should run these two commands:

    mysql> SELECT id, registryId FROM apsResources WHERE pleskType="db" AND pleskId=17;
    +----+--------------------------------------+
    | id | registryId |
    +----+--------------------------------------+
    | 3 | 3a50ca33-b863-456e-b5da-c60e91ae4b26 |
    +----+--------------------------------------+

    ^ make note of id, registryID

    mysql> SELECT id, name FROM data_bases where dom_id=23;
    +-----+--------------------------+
    | id | name |
    +-----+--------------------------+
    | 17 | example_db |
    | 27 | example_db_NEW |
    +-----+--------------------------+

    ^ Make note of id (27) - this is ID of the existing database you want to be associated with your domain
    (associating it within wordpress toolkit won't do this for you)

    After doing step #7:

    mysql> INSERT into apsResources values (3,'3a50ca33-b863-456e-b5da-c60e91ae4b26','db',27);

     

    1
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request