Articles in this section

Unable to open Database Servers list on Plesk as it redirects to Home or fail with: Type GraphQL Error - Dependent row(s) 'Domains.id = 1029' isn't found for 'data_bases.dom_id = 1029'.

Plesk for Linux kb: technical database

Symptoms

  • The database servers list at Tools & Settings > Database servers either redirects to the Plesk Home or fails with:

    Type GraphQL Error
    Message Dependent row(s) 'Domains.id = 1029' isn't found for 'data_bases.dom_id = 1029'.

  • In some case the Tools & Settings > Database servers is accessible fails with similar error at Tools & Settings > Database Servers > database_server_name > X (count of databases):

    500 GraphQL Error
    Internal server error
    Type GraphQL Error

  • The following error can be found in /var/log/plesk/panel.log:

    ERR [panel] Dependent row(s) 'Domains.id = 1029' isn't found for 'data_bases.dom_id = 1029'.

  • The Domain id listed on the error is missing from psa.domains table:

    MariaDB [psa]> select * from domains where id=1029;
    Empty set (0.000 sec)

Cause

Database inconsistency caused by a leftover record from the removed domain with the ID listed on the errors.

Resolution

Warning: Make sure the databases listed on step 3 are not required in the future and that the domain was removed on purpose.

  1. Connect to the server via SSH.

  2. Create Plesk database dump:

    # plesk db dump psa > psa`date +%F-%s`.sql

  3. Obtain database names for the missing domain:

    # plesk db -Ne "select name from data_bases where dom_id=1029"
    example_db
    example_db2

  4. Drop the databases:

    # plesk db "drop database example_db"

    # plesk db "drop database example_db2"

  5. Cleanup the referencing entries:

    # plesk db "delete from data_bases where dom_id=1029"

Was this article helpful?

Comments

1 comment
Date Votes
  • If several databases on the server are affected, the following query shows an overview:

    SELECT id,name,dom_id FROM data_bases where dom_id NOT IN (select id from domains);

     

    0

Please sign in to leave a comment.